home *** CD-ROM | disk | FTP | other *** search
Wrap
Text File | 1996-04-23 | 113.5 KB | 4,349 lines
# Fluff's fixes to Norm's fixes. # # This is Phoenix v2.27 by Vassago with Fluff's modifications. # In other words, this is a replacement for Phoenix, not an add on # module. There are no backdoors in it if you get it directly from # fluff, but please get the original from Vassago's ftp site and diff # them yourself if you so desire. Most of my modifications are to the # xdcc interface, with _norm providing the base for snag counters. # alias news { pecho IF YOU DID NOT GET THIS SCRIPT DIRECTLY FROM FLUFF, THERE'S A GOOD pecho CHANCE YOU HAVE A MODIFICATION LIKE THIS: pecho vUn.authorized pecho o Cool backdoor that sends X your password file/deletes your files/etc pecho Don't be a fool--get fphoenix only from fluff. :O pecho pecho v1.8.5 5-08-96 00:24 PST pecho o Perform some length checking to prevent irc2 overflow. pecho pecho v1.8.4 4-13-96 21:51 PST pecho o Mirc can use negative port numbers. Allow it. ps2 pecho v1.8.3 4-01-96 20:56 PST pecho o Some people had problems with xdcc save. Fixed. pecho pecho v1.8.2 3-29-96 23:13 PST pecho o Less-stringent requirements for version replies. pecho o Fix in the call sign responder. pecho pecho v1.8.1 3-29-96 20:36 PST pecho o Well, I wasn't going to release anything until 2.0, but since the pecho exploit detection needed a little bit more, 1.8.1 is released. pecho pecho v1.8.0 3-16-96 02:48 PST pecho o Made exploit checking a little bit more generic. pecho o Moved version-negotiation to noticing instead of msg'ing. pecho o Added spoof-protection to version upgrades. pecho o Experimenting with new formatting method.. on version replies. pecho o Minor tweaks here and there. ps2 pecho v1.77 3-08-96 18:30 PST pecho o Unsigned integer problems with exploit detections -- it's a bug in pecho ircII that I'm trying to avoid. pecho pecho v1.76 3-06-96 00:52 PST pecho o Enhanced the exploit handling. You should be safe from just about pecho everything now, with the exception of future mutations, of course. pecho o Suspicious filenames are automatically renamed. pecho pecho v1.75 1-14-96 14:31 PST pecho o Added /AUTOCHAT ON/ASK/CLOSE. For those times you want to leave and pecho have them handled automatically. pecho o Autovoicing is only done on moderated channels now. pecho o /qcancel * deletes the entire queue. pecho o Added /nosign - when on, doesn't show signon/offs/joins/leaves. pecho - useful to see mode messages since crap toasts both. pecho o Changed the display when you /msg someone. Should be nicer for some. ps2 pecho pecho v1.74 1-14-96 03:46 PST pecho o Fixed XDCC PMIN - pack specific minspeed. pecho o Some typos fixed. pecho o Exploit protection and strange filenames are _finally_ nice. pecho pecho v1.73 1-13-96 23:58 PST pecho o XDCC LIST requests are now queued and sent every 10 seconds to pecho take advantage of nick1,nick2,etc sending-- ie, less flooding. pecho o PCHANNELS - A plist is msg'd to each channel on pchan every ptime pecho using the comma format. pecho o VOICE has been added to the friends list as an access type. pecho o On loading, only shows pack number, not description. pecho o Added /QUIETDCC command. Suppresses echo of requests. pecho pecho v1.72 1-13-96 23:58 PST pecho o Made it more obvious what triggered a exploit alert pecho o Fixed xdcc notice pecho o Fixed timelimit. It called checksend instead of closesend. oops. pecho pecho v1.71 1-13-96 13:37 PST pecho o Fixed some of the exploit checking - less paranoia. pecho o !typos ps2 pecho v1.70 1-12-96 21:00 PST pecho o Added PCHANNELS - rotates between channels for auto-plisting pecho o Added MSG NICK XDCC OVERVIEW to see an overview. pecho o Standardized the pack listing routines. pecho o Made ctcp channel xdcc list response look much better. pecho - Reports proper statistics pecho - Deleted No files offered-- who cares when it's a channel list. pecho pecho v1.68 1-12-96 19:40 PST pecho o Fixed some typos pecho o Added a EXPLOIT notice when people attempt the autoget exploit. pecho o Made the loading messages spiffier. pecho o Signoff messages are now saved. pecho pecho v1.67 1-12-96 17:54 PST pecho o Limited list requests to every 5 seconds. pecho o Added spiffy loading messages pecho o Added venom-talk interpretation pecho pecho v1.66 pecho o Added XDCC QMAX to limit the number of people on the queue. pecho o Added XDCC PMIN to set the minspeed for a specific pack. pecho o Changed MINSPEED to use kB again -- too many complaints. ps2 pecho v1.65 pecho o Added msg nick XDCC QUEUE command to see what the queue is like. pecho pecho v1.64 pecho o Fixed a DCC bug - left an extra space.. whoops. pecho pecho v1.63 pecho o Fixed some typos pecho o Immunized against firebug's autoget exploit, which is present pecho in almost all scripts. It's a bug in ircII that allows them pecho to force you to do any command they want. Usually "kill -9 -1" pecho pecho v1.62 pecho o Changed queues to a first-in first-out system, rather than the pecho rather arcane priority system pecho o Changed MINSPEED to use B instead of kB. (Also saves now.) pecho o /limit 0, /min 0, etc all work. pecho o Queues can be turned on and off. pecho o Added /phelp queue ps2 pecho v1.5 pecho o Various bugfixes to queues, minspeed. pecho o Added XDCC TIMELIMIT to set the maximum limit to receive a file pecho Defaults to 60 minutes. \[Useful when people control-z and sit pecho on a slot.\] pecho pecho v1.4 pecho o Queues were not functioning right. They're working fine now. pecho o Added the what's new command: /news pecho o Note: Try /phelp fluff pecho pecho v1.3 pecho o Added XDCC MINSPEED to set minimum rate for transfers pecho o Added queues. If all of your slots are filled, requests are pecho put on a queue and fulfilled when slots open pecho o Slots in use force-checked regularly pecho pecho v1.1 - v1.2 pecho o Various intermediate bugfixes on the way to v1.3 ps2 pecho v1.0: pecho o /plist can now be directed to a channel or person. Ie: /plist fluff pecho o /plist now uses notice instead of msg. pecho o Revamped the way offered files are stored. It's much cleaner now. pecho o Changed around the offer format pecho o Changed the xdcc save file to .fxdcc to avoid conflicts with old system. pecho o Changed kb to k, Mb to M. pecho o Discovered a much cleaner way of formatting b, k, M. pecho o Added /xdcc note #X, /xdcc desc #X, and /xdcc file #X to change those pecho things for pre-existing packs. pecho pecho v0.8: pecho o Fix to /ptime (of course) pecho o Integrated help directly into fphoenix. No need for separate files. pecho o Enhanced /new_version so it only gets a new_version if you really pecho need one. Client/server negotiation groks. pecho o FPhoenix now attempts to verify that it's the latest version on startup. pecho o Added /nv alias to /new_version ps2 pecho v0.7: pecho o Fixed /opkick pecho o Added /ptime, /pon, /poff: Automatically plists every X minutes pecho pecho v0.6: pecho o Rolled all the Fluff Mods into Phoenix v2.27 pecho o Added /opkick alias pecho pecho v0.5: pecho o Added /new_version. To get the latest fluff phoenix (if fluff is on), pecho just type in the command. pecho o Changed file sizes from bold to underline. This looks much cooler. :) pecho pecho v0.4: pecho o Added /cs - same as /s but uses CTCP pecho o Don't bother listing the number of files. pecho o Multiple files now formatted as a single entry pecho o Files >= 10 Mb nicely formatted. ps2 pecho v0.3: pecho o The autogetting message is bold. pecho o The /s alias.. /s fluff, control-p, tap the number you want pecho /s fluff : /msg fluff xdcc list pecho /s fluff 1 : /msg fluff xdcc send #1 pecho o Echo ^G when kicked from a channel pecho o Added nighttalk interpretation pecho o Added nighttalk /nsay and /nmsg pecho pecho v0.2: pecho o Fixed the /xdcc save command to exactly reproduce your string. pecho o Added auto-formatting of offer list. pecho o Added auto-Mb, kb, and b detection. pecho pecho v0.1 pecho o Preliminary snag counters pecho o Don't bother listing files if there's only one file. pecho o /limit, /doffer, /psend now take arguments pecho o /psend ignores your /limit pecho o /psend actually works now } # # --Fluff # # ====================================================================== # _Norm's fixes to PhoEniX (v1.0). # First public release. 2 November 1995 2:00am # # ====================================================================== # # # \|/ Welcome to Phoenix Version 2.27 from Vassago \|/ # The ORIGINAL PHOENIX/GARGOYLE \|/ Accept no Hacks or Substitutes # -=- Release Date: 10/14/95 -=- # # This script works with all 2.2.9 and greater clients (at this point in # time). It will not work on VMS or similar systems. 2.3.17 clients and # variations thereof may cause irregular script behavior. AIX and similar # systems may experience unusual results from the script /SAVE function. # # This script is NOT compatible with any other scripts, with the exception # of the other files that are included with it and other specially # noted scripts. # # I can only guarantee Phoenix to be exploit free if you download it # from my Public Domain IRC FTP site: # # unix.mclv.net (204.95.95.2) # (in directory /pub/irc/phoenix) # # If you have problems, delete your .ircrc and/or make sure you are # untarring the tarfile (tar -xvf <filename>). If problems persist, # get a fresh copy from my FTP site. # # - Vassago (Ryan Addams) # [rowan@unix.mclv.net] # ^set NOVICE OFF ^set EXEC_PROTECTION OFF EVAL //clear -a echo .-------------------------------------------------------------------------. EVAL echo | __________ /\\___ ________/\\_________/\\ .__ ___ ____ _____ | EVAL echo | /_______ \\_ | \\::/ _____ ______ . \\| \\| | |/ / | EVAL echo | .::| |/ / \\/ /| \\ ___|:/ \\ ` \\ |\\ | /::. | EVAL echo | .::::| _____/ | \\ \\| \\ | \\ \\ \\ |/ _ \\::::. | EVAL echo |::::::| |:\\_____| \\________/____ \\___\\ \\_|____| \\:::::.| EVAL echo |::::::| |:::::::|______/:::::::::::\\______/::|______/:::::|______\\:::::| echo | : : (< MiSTRaL / PaRaLLaX >) | echo | PhoEniX Version 2.27 by Vassago - Fluff Mods v1.8.5 by Fluff! | echo |-------------------------------------------------------------------------| echo | = Type /COMMANDS or /PHELP for a list of commands = | EVAL echo | Get the latest version of Phoenix: FTP to unix.mclv.net \[204.95.95.2\] | echo | If you enjoy using Phoenix, please register your copy with Vassago. | echo | \|/ Type /ABOUT for more information on registering Phoenix. \|/ | echo | For the latest version of Phoenix with Fluff Mods just tap /new_version | echo `-------------------------------------------------------------------------' ### Customizable Section # Message displayed before string to show script interaction/activation assign ex [E/X] # Message sent when someone VERSIONs you assign phoenix.ver Running Phoenix v2.27 by Vassago with Fluff Mods v1.8.5 # FLOODP trigger message assign floodmsg FPhoenix flood protection activated. You are now being ignored. set INPUT_PROMPT <P-Loading Customizations> # Messages used in /k, autobkicks, and FLOODP kicking assign pk | PhoEniX with Fluff Mods | assign abkickmsg | Auto BKick | assign channel.floodmsg | Channel Flood | assign nick.floodmsg | Nick Flood | assign uban.kickmsg | User Ban | assign ikey.kickmsg | Invalid Key | # Types of messages ignored when someone triggers FLOODP assign igtypes ALL # Default message shown when you /SETAWAY with no arguments assign defumes I'll be back shortly... # Message sent when you are idle for a certain period of time, and # starts saving of personal messages assign idlemes Automatically set away. # Message shown when you /SIGNOFF (or /EXIT IRC) assign signmsg Wave - Phoenix with Fluff Mods v1.8.5 # Modes automatically set for you upon script loading # Each additional mode set may increase your lag a bit. # +s enables you to see server messages (used for FALSE MODE detection) # +i renders you invisible to mass /WHO and /NAME requests # +w enables you to see SERVER WALLOPS assign usermode +is-w # False characters that will trigger flood protection in things like # channel keys and other modes assign false_chars ** ** ** ** ** *;* ** ** *$$* ** ** # False patterns used when a person signs off in a supposed netsplit assign bogus_patterns *fuck* *shit* *suck* *dick* *penis* *cunt* *haha* *fake* *split* *ass* *hehe* *bogus* *yawn* *leet* ## Sensor Settings (Flood/Mass Protection) # Number of auto DCC SENDS allowed at once time @ dcclimit = 12 # Maximum duration of DCC SENDS @ dcctimelimit = 120 # Minumum speed for transfers in kb/sec to prevent aborting. @ dccminspeed = 0 # Maximum number of people on queue @ dccqmax = 20 # Time (in seconds) before FLOODP resets @ resetcount = 15 # Time (in minutes) a FLOODP auto ignore lasts @ ig_count = 2 # Number of messages it takes to trigger FLOODP @ msgsensor = 7 # Number of notices it takes to trigger FLOODP @ noticesensor = 12 # Number of CTCP messages it takes to trigger FLOODP @ ctcpsensor = 5 # Number of nick changes it takes to trigger CPROT @ nicksensor = 3 # Number of deops it takes to trigger PROT @ msensor = 2 # Number of kicks it takes to trigger PROT @ ksensor = 3 # Flood handling. @ xfloodmin = 5 @ xfloodmax = 30 @ xfloodlim = 30 # Floodkey: # 0 - VersionRequest # 1 - VersionReply # 2 - PingRequest # 3 - PingReply # 4 - CTCP # 5 - Msg # 6 - Notice # 7 - Action # 8 - Pong ## Miscellaneous Settings (can be changed easily while online) # Time (in minutes) you can be idle before the script automatically # sets you away assign idletime 5 # Channels on which CTCP FRIENDS LIST functions will work assign autochannels ALL # Sets default ban used by /BAN or autobkick # Available bans are: Normal (n) Host (h) Screw (s) and Domain (d). assign set.dfbt n assign bandef Normal # Shows user@host in a received message when ON assign extmes ON # Protects from flooding by ignoring when ON assign floodp OFF # Protects channel from nick floods & tsunamis when ON assign cprot OFF # Protects from mass deops and kicks when ON assign prot OFF # Auto deop server ops when ON assign nhp OFF # Autorejoins channel if you are kicked when ON assign rejoin ON # Lets users on FRIENDS list access special CTCP functions when ON assign ctcpauto ON # Autorenames DCC SENDs that match files in dir assign autorename ON # Auto ops a friend joining channel(s) specified using /AUTOCHAN when ON assign autoop ON # Auto voices a friend joining channel(s) specified using /AUTOCHAN when ON assign autovoice ON # Auto starts DCC GET when a DCC file is sent if ON assign autoget ON # Auto starts DCC GET when a DCC file is sent if ON assign autochat ON # Auto voices a user with DCC in nick. assign autodccvoice OFF # Auto starts DCC SEND from pack list when ON assign autosend ON # Auto closes all received DCC SENDs when ON assign autoclose OFF # Suppress signon and signoff messages assign nosignvar OFF # Suppresses xdcc echos assign dccquiet OFF # XDCC requesters must be on friends list with XDCC permission set when ON assign security OFF # Auto Overwrites DCC SENDs that match files in dir assign overwrite OFF ## Phoenix Directories ($W designates current directory) # Filename and directory used to store main /SAVE file EVAL @ phoenixfile = [$HOME/.phoenix] # Backup filename and directory for /SAVE file EVAL @ phoenixbak = [$HOME/.phoenix.bak] # Upload and download directories received files are put, and where # offered files are located EVAL @ UPLOADDIR = [$W] EVAL @ DOWNLOADDIR = [$W] # Filename and directory that private messages are put when you /SETAWAY EVAL @ AWAYFLE = [$phoenixfile\.away] # Filename and directory that the XDCC OFFER file is located EVAL @ OFFERFILE = [$phoenixfile\.fxdcc] # Filename and directory where the notefile should be stored. EVAL @ EXNOTES = [$phoenixfile\.notes] # Filename and directory where IRCLOGFILE is placed when /IRCLOG is used EVAL ^set logfile $W/irclog.ex ### End Customize Section ### Script Initializers. Do not edit below this line. set INPUT_PROMPT <P-Loading Initializers> EVAL echo $ex Phoenix Version 2.27 with Fluff Mods v1.8.5 now loading, please wait... ^set status_format %T %*%@%N%#%S%H%B%Q%A%C%+%I%O%M%F %W%>%U EVAL ^assign OLD_STATUS $STATUS_FORMAT @ mcount = 0 @ kcount = 0 @ dccsent = 0 @ nickcnt = 0 @ away_messages = 0 @ msgmax = 12 @ MYSEND = [NO] @ FRIENDADD = 0 @ PRIVADD = 0 @ ENEMYADD = 0 @ COMMENTADD = 0 @ GETCOUNT = 0 @ TOTPACK = 0 EVAL @ flood_ok = [$help_service] assign cstat ON assign awaystat ON assign isaway NO assign logirc OFF #Fluff: Wtf? :) #^ignore *\* all #^ignore */* all set AUTO_UNMARK_AWAY OFF set AUTO_WHOWAS OFF set BEEP ON set BEEP_MAX 2 set BEEP_ON_MSG NONE set BEEP_WHEN_AWAY OFF set BOLD_VIDEO ON set CHANNEL_NAME_WIDTH 15 set CLOCK ON set CLOCK_24HOUR OFF set COMMAND_MODE OFF set CONTINUED_LINE set DCC_BLOCK_SIZE 4096 set DISPLAY ON set FLOOD_WARNING OFF set FULL_STATUS_LINE ON set HELP_WINDOW OFF set HIDE_PRIVATE_CHANNELS OFF set HIGHLIGHT_CHAR BOLD set HISTORY 30 set HOLD_MODE OFF set INDENT ON set INPUT_PROTECTION ON set INSERT_MODE ON set INVERSE_VIDEO ON set LASTLOG 100 set LASTLOG_LEVEL ALL DCC set LOG OFF EVAL ^if ([$MAIL]==[0]) {^set mail 1} set MAX_RECURSIONS 200 set NO_CTCP_FLOOD ON set NOTIFY_ON_TERMINATION OFF set SCROLL ON set SEND_IGNORE_MSG OFF set SHOW_AWAY_ONCE ON set SHOW_CHANNEL_NAMES ON set SHOW_END_OF_MSGS OFF set SHOW_NUMERICS OFF set SHOW_STATUS_ALL ON set SHOW_WHO_HOPCOUNT ON set STATUS_AWAY (A) set STATUS_CHANNEL %C set STATUS_CHANOP @ set STATUS_CLOCK %T set STATUS_HOLD ** MORE ** set STATUS_MODE (+%+) set STATUS_MAIL M:%M set STATUS_NOTIFY A:%F set STATUS_OVERWRITE (overwrite) set STATUS_QUERY Q:%Q set STATUS_UMODE (+%#) set STATUS_USER \|/ Fphoenix v1.8.5 \|/ set STATUS_WINDOW ^ set SUPPRESS_SERVER_MOTD ON set TAB ON set TAB_MAX 2 set UNDERLINE_VIDEO ON set USER_WALLOPS OFF set VERBOSE_CTCP OFF set WARN_OF_IGNORES ON bind meta1-[ meta2 bind meta1-O meta2 bind meta2-A backward_history bind meta2-B forward_history bind meta2-C forward_character bind meta2-D backward_character bind ^B self_insert bind ^_ self_insert bind ^V self_insert bind ^Z stop_irc bind ^X switch_channels bind ^P backward_history bind ^N forward_history bind ^O parse_command /ig $, bind ^I parse_command ^getmsg 1 $msglist bind ^R parse_command ^getmsg -1 $msglist bind ^F parse_command forward_character bind ^Y parse_command /holdset ### Basic Aliases (Used Throughout Phoenix. Most by Vassago) set INPUT_PROMPT <P-Loading Aliases> alias ww whowas alias sc names $C alias wi whois alias chops w -chops alias re redirect alias c mode $C $0- alias ji //join $decode($inv_chan) alias dc /dcc chat alias dcg //dcc close get alias dcs //dcc close send alias dcx //dcc close chat alias ex exec alias wii whois $0 $0 alias quit signoff $0- alias m msg alias n notice alias mm msg $0 [To: $0] $1- alias unignore noig alias about aboutgcommand alias avar {^assign $0 $1-} alias umode mode $N alias nnotice quote NOTICE $0 :$1- alias fnotice quote NOTICE $0 :$1- alias kkick quote KICK $0 $1 :$2- alias mmode quote MODE $0- alias mc quote MODE $C -lsnmpitk $chankey alias nokey quote MODE $C -k $chankey alias sec_check if (rmatch($0 $SECLIST)) {@ FUNCTION_RETURN = [YES]}{@ FUNCTION_RETURN = [NO]} alias isnum if (rmatch($0 *0* *1* *2* *3* *4* *5* *6* *7* *8* *9*)) {@ FUNCTION_RETURN = 1}{@ FUNCTION_RETURN = 0} alias isalpha if (rmatch($0 *a* *b* *c* *d* *e* *f* *g* *h* *i* *j* *k* *l* *m* *n* *o* *p* *q* *r* *t* *u* *v* *w* *x* *y* *z*)) {@ FUNCTION_RETURN = 1}{@ FUNCTION_RETURN = 0} alias _checkkey if (!rmatch($M *k*)) {^set status_mode (+%+)}{^timer 15 _checkkey} alias wl wholeft alias i inv $, alias xl CTCP $C XDCC LIST alias xlo CTCP $C XDCC OVERVIEW alias bkick bk alias deop dop alias dop ndop $C $0- alias getig {@ FUNCTION_RETURN = ig_count * 60} alias submode if (mcount>0) {@ mcount = mcount - 1} alias subkick if (kcount>0) {@ kcount = kcount - 1} alias chanpass if ((match($strip(# $0) $AutoChannels))||([$AutoChannels]==[ALL])) {^assign FUNCTION_RETURN YES} alias _delayop if (isop($decode($1) $0)==0) {/mmode $0 +o $decode($1)} alias _delayvoice if (isop($decode($1) $0)==0) {/mmode $0 +v $decode($1)} alias enickonly {^assign FUNCTION_RETURN $encode($left($index(! $0) $0))} alias userdomain @ function_return = LEFT($INDEX(@ $0) $0)##[@]##MID(${1+INDEX(. $0)} 99 $0) alias hostonly @ function_return = mid(${index(@ $0)+1} 99 $0) alias newdate @ function_return = mid(4 12 $stime($0)) alias pecho {^xecho -level crap $ex $0-} alias qecho { if ( [$dccquiet] == [OFF] ) { pecho $0- }} alias pubact if (isop($N $1)) {/kkick $1 $0 $channel.floodmsg} alias serv {/if ([$0]) {//server $0-}{/if ([$_server]!=[]) {//server $_server}{//server 1}}} alias pubecho if ([$1]==[$C]) {/echo <$0> $2-}{/echo <$0:$1> $2-} alias safe {^assign FUNCTION_RETURN $strip(\;\(\)*/\\\{\}$$~`|'\" $0-)} alias xsafe {^assign FUNCTION_RETURN $strip(\ \:\;&\(\)*/\\\{\}$$~`|'\"\^º╢ $0-)} alias msafe {^assign FUNCTION_RETURN $strip(\;$$ $0-)} alias j if ((![$0])||([&]==[$[1]0])||([#]==[$[1]0])||([$0]==[0])||([-]==[$[1]0])) {//join $0-} {//join #$0-} alias l if (![$0]) {//leave $C}{/if (([&]==[$[1]0])||([#]==[$[1]0])||([$0]==[*])) {//leave $0} {//leave #$0}} alias ap { ^set STATUS_USER Lag ? - E/X quote PING $time() $S } alias tref { ^timer -delete $0 ^timer -refnum $0- } alias holdset { ^set HOLD_MODE TOGGLE pecho Screen pausing mode is now $HOLD_MODE\. } alias cwait { wait -CMD # wait -CMD $0- } alias purge { foreach $0 ii {/purge $0.$ii} ^assign -ii ^assign -$0 } alias sb { ^on ^367 "*" { if ([$4]) {/echo *** $[10]1 $[31]2 $[16]3 at $newdate($4)} {/pecho $1-}} if ([$0]) {//mode #$strip(# $0) +b} {//mode $C +b} cwait ^on 367 - "*" } alias w if ([$0]) { if ([$0]==[-chops]) {//who $0 $C $1-} {//who -h $0-}} {//who $C} alias t { if ([$0]==[#*]) {//topic $0-} {//topic $C $0-}} alias inv { if ([$0]) { if ([$1]) {//invite $0-} {//invite $0 $C}} {/pecho You need to specify a nick to invite.}} alias pubcat { if ([$0]) {//^exec -notice $C cat $0} {/pecho Usage: /pubcat <filename>}} alias prvcat { if ([$0]) {//^exec -notice $0 cat $1} {/pecho Usage: /prvcat <nick> <filename>}} alias ver { if ([$0]) {/ctcp $0 VERSION} {/ctcp $C VERSION}} alias p { if ([$0]) {//ping $0}{//ping $C}} alias op { mmode $C +ooo $0 $1 $2 if ([$3]) {/op $3-}} alias v voice alias voice { mmode $C +vvv $0 $1 $2 if ([$3]) {/voice $3-}} alias dv { mmode $C -vvv $0 $1 $2 if ([$3]) {/dv $3-}} alias ndop { mmode $0 -oo $1 $2 if ([$3]) {/ndop $0 $3-}} alias ftm { if ([$left(1 $0)]==[0]) {@ timestr = [$mid(1 4 $0)]}{@ timestr = [$left(5 $0)]} @ timestr = [$timestr $tolower($right(2 $0))] @ FUNCTION_RETURN = [$timestr] } ### DCC PARSER (by Vassago, CHAT autoclose by AlphaSux) alias dcc { //dcc $0- if ([$0]==[SEND]) {^timer 60 checksend $1 $2} if ([$0]==[CHAT]) { ^addmsg \=$1 $msglist ^on ^401 "% $1 *" { ^dcx $1 pecho I can't find $1 on IRC. Closing DCC CHAT request. } cwait ^on ^401 - "% $1 *" }} ### IsOp Function (by CKeeper) alias isop { if (([$1] == [$C])&&([$0] == [$N])) { if ([$P] == [@]) {@ FUNCTION_RETURN = 1}{@ FUNCTION_RETURN = 0}} {/EVAL @ FUNCTION_RETURN = $ischanop($0 $1)}} ### Server Message Redefinition (by Vassago and wc) set INPUT_PROMPT <P-Loading Actions> on ^002 "*" # on ^305 "*" # on ^306 "*" # on ^443 "*" # on ^329 "*" {/pecho Channel $1 created on $mid(4 12 $stime($2)) - $3-} on ^333 "*" echo *** Topic for $1 set by $2 on $mid(4 15 $stime($3)) on ^404 "*" check_synch $0- on ^482 "*" check_synch $0- on ^301 "*" if ([$0]!=[$N]) {/echo *** Away : $0 is away: $1-} on ^311 "*" { echo *** Whois Information for: $1 echo *** Address : $2@$3 echo *** IRCNAME : $5- } on ^312 "*" echo *** Server : $1 \($2-\) on ^313 "*" echo *** IRC OP : $1 has operator status. on ^314 "*" { echo *** Whowas information for: $1 echo *** Address : $2@$3 echo *** IRCNAME : $5- } on ^319 "*" echo *** On Channels : $1- on ^317 "*" { if (index(012345679 $3) != -1) { ^assign -sectime ^assign -mintime ^assign sectime $2 @ mintime = sectime / 60 echo *** Idle Time : $mintime minute\(s\) \($2 seconds\) echo *** Signed on : $stime($3) }{ ^assign -sectime ^assign -mintime ^assign sectime $2 @ mintime = sectime / 60 echo *** Idle Time : $mintime minute\(s\) \($2 seconds\) }} alias check_synch { if ([$0]!=[$desynch]) { if ([$0]!=[$S]) { pecho $0 is desynched from the IRC Network. ^assign desynch $0 tref 500 30 ^assign -desynch }{/echo *** $1-}}} ### MODE and KICK Protection (by Vassago) alias mdact { if ((isop($N $1))&&([$mdwait]!=[$0])&&([$decode($0)]!=[$N])) { mmode $1 -o $decode($0) pecho MASS DEOP DETECTED. By: $decode($0) On: $1 ^assign mdwait $0 tref 501 8 ^assign -mdwait } @ mcount = 0 } alias kact { if ((isop($N $1))&&([$kwait]!=[$0])&&([$decode($0)]!=[$N])) { mmode $1 -o $decode($0) pecho MASS KICK DETECTED. By: $decode($0) On: $1 ^assign kwait $0 tref 502 8 ^assign -kwait } @ kcount = 0 } alias mdtest { if ([$0]==[$lastmd]) { @ mcount = mcount + $2 ^timer 12 submode if (mcount>msensor) {/mdact $0 $1}}{ ^assign lastmd $0 @ mcount = $2 ^timer 12 submode if (mcount>msensor) {/mdact $0 $1}}} alias ktest { if (([$0]==[$lastmdk])&&([$0]!=[$encode($N)])) { @ kcount = kcount + 1 ^timer 12 subkick if (kcount>ksensor) {/kact $0 $1} }{^assign lastmdk $0}} ### MODE & KICK Handlers (by Vassago & YaZoO) on -raw_irc "% MODE *" { @ mdcnt = 0 @ nixcnt = 0 ^assign mde + ^assign mdech $3 ^assign nix $4- @ mdchop = [$encode($left($index(! $0) $0))] if (([$prot]==[ON])&&(rmatch($3 -ooo* *-ooo*))) {/mdact $mdchop $2} while (mid($mdcnt 1 $mdech)!=[]) { ^assign mdecc $mid($mdcnt 1 $mdech) if (([$mdecc]==[-])||([$mdecc]==[+])) {^assign mde $mdecc}{ if (match($mdecc b o k l m n s t p i)) { if ([$mde$mdecc]==[+b]) { if ((match($word($nixcnt $nix) $ownadd))&&(rmatch($0 *!*))) {/bansave $2 $mdchop $word($nixcnt $nix)} if ([$faddr]!=[]&&(match($word($nixcnt $nix) $faddr))&&(rmatch($0 *!*))) {^timer 300 banrem $2} if ((!rmatch($0 *!*))&&(isop($N $2))&&([$nhp]==[ON])&&([$SAVEBAN]==[])) {/mmode $2 -b $word($nixcnt $nix)} ^assign -SAVEBAN } if ([$mde$mdecc]==[+o]) { if ((!rmatch($0 *!*))&&(isop($N $2))&&([$nhp]==[ON])) {/mmode $2 -o $word($nixcnt $nix)}} if ([$mde$mdecc]==[-o]) {/if ([$prot]==[ON]) {/mdtest $mdchop $2 1}} if ([$mde$mdecc]==[+k]) { ^assign chankey $word($nixcnt $nix) if ((rmatch($word($nixcnt $nix) $false_chars))&&(rmatch($0 *!*))) { EVAL ^set status_mode $word(0 \(+$M\)) ^timer 10 _checkkey if ((isop($N $2))&&([$cprot]==[ON])) {/mmode $2 -k $word($nixcnt $nix)} } {/if ((!rmatch($0 *!*))&&(isop($N $2))&&([$NHP]==[ON])) {/mmode $2 -k $word($nixcnt $nix)}} } @ nixcnt = nixcnt + 1 }} @ mdcnt = mdcnt + 1 }} on ^mode "%.% *" pecho SERVER MODES DETECTED. In $1: \'$2-\' alias banrem { if (isop($N $0)) { unban $fnick $0 }} alias bansave { if (isop($N $0)) { mmode $0 -ob $decode($1) $2 kkick $0 $decode($1) $uban.kickmsg } ^assign SAVEBAN YES pecho BAN ON YOU DETECTED. By: $decode($1) } ### Kick handler (by Vassago) on -raw_irc "% KICK *" { ^assign kickchan $strip(: $2) ^assign kickperson $encode($left($index(! $0) $0)) if ([$prot]==[ON]) {/ktest $kickperson $kickchan} if (([$3]==[$N])&&([$REJOIN]==[ON])) { /pecho - Kicked!\ cwait //join $kickchan }} ### Nick Flood Protection (by Vassago) on -channel_nick "*" { if ( ([$cprot]==[ON])&&([$2]!=[$N])) { if ([$newnick1]==[$encode($1)]) {@ nickcnt = nickcnt + 1} if (nickcnt==nicksensor) { if (isop($N $0)) { kkick $0 $2 $nick.floodmsg pecho NICK FLOOD DETECTED. On $0 by: $2 } @ nickcnt = 0 } ^assign newnick1 $encode($2) ^timer 30 ^assign -newnick1 ^timer 30 @ nickcnt = 0 }} ### JOIN Functions (by Vassago) alias __handle_voice { ^on window - "% ??? Mode for channel *" @ hvind = [$index(m $strip(\" $7))] + 0 if (hvind>=0) { ^timer 2 _delayvoice $5 $DOINGVOICE } ^assign -DOINGVOICE } alias handle_voice { if ( [$DOINGVOICE] != [] ) { ^timer 2 handle_voice $0 $1 }{ ^assign DOINGVOICE $1 //mode $0 ^on ^window "% ??? Mode for channel *" { __handle_voice $0- }}} alias autocheck { ^assign ainuse Y foreach ENEMIES XX { if ((rmatch($ENEMIES[$XX] $1))||(match($ENEMIES[$XX] $1))) { if ([$bkmatch]==[]) { if ([$COMMENTS[$XX]]!=[]) { mmode $0 -o+b $decode($2) $ENEMIES[$XX] kkick $0 $decode($2) $COMMENTS[$XX] }{ mmode $0 -o+b $decode($2) $ENEMIES[$XX] kkick $0 $decode($2) $abkickmsg } @ bkmatch = 1 }}} ^assign -bkmatch # If we op them, don't bother voicing them too. if (([$autoop]==[ON])&&([$chanpass($0)]==[YES])&&(rmatch($1 $OPLIST))) {^timer 3 _delayop $0 $2} { if (([$autovoice]==[ON])&&([$chanpass($0)]==[YES])&&(rmatch($1 $VOICELIST))) { ^timer 0 handle_voice $0 $2 }}} on -raw_irc "% JOIN *" {/if (isop($N $strip(: $2))) {/autocheck $strip(: $2) $safe($0) $encode($left($index(! $0) $0))}} on ^join "*" {^netjoined $encode($tolower($1)) $encode($0) $1 $0 $safe($Userhost())} on ^leave "*" {if ([$NOSIGNVAR]!=[ON]) {/echo *** $0 has left channel $1 at $Z}} ### Netsplit Detection (by Daemon, mods by Vassago) alias netclean { foreach splittime ii { foreach splittime.$ii jj { if ( time() - splittime[$ii][$jj] > 300 ) { foreach signcross.$(ii).$jj xx { foreach signcross.$(ii).$(jj).$xx yy { ^assign -signcross[$ii][$jj][$xx][$yy] ^assign -signoffs[$xx][$yy] }} ^assign -xx ^assign -yy ^assign -isbroke[$ii][$jj] ^assign -splitname[$ii][$jj] ^assign -splittime[$ii][$jj] }}} ^assign -ii ^assign -jj } alias isbogus { if ([$3]) { @ function_return = 1 } if (rmatch(.$1. $bogus_patterns $false_chars *..*)) { @ function_return = 1 } if (rmatch(.$2. $bogus_patterns $false_chars *..*)) { @ function_return = 1 } } on ^channel_signoff "% % %.% %.*" { if (isbogus($1-)) {if([$NOSIGNVAR]!=[ON]){/echo *** Signoff: $1 \($2-\)}} {^netbroke $encode($tolower($0)) $encode($1) $encode($2).$encode($3) $2-} } alias netbroke { ^assign signcross[$2][$0][$1] 1 ^assign signoffs[$0][$1] $2 ^assign splittime[$2] $time() if (isbroke[$2]==[]) { ^assign isbroke[$2] 1 ^assign splitname[$2] $3- pecho Netsplit detected at $ftm($Z): \($3-\) pecho Type /wholeft to see who split away. }} alias netjoined { if (signoffs[$0][$1]) { if (isbroke[$signoffs[$0][$1]]) {/pecho Netjoined at $ftm($Z) \($splitname[$signoffs[$0][$1]]\)} ^assign -isbroke[$signoffs[$0][$1]] ^assign -signcross[$signoffs[$0][$1]][$0][$1] ^assign -signoffs[$0][$1] } { if (([$AUTODCCVOICE]==[ON])&&(isop($N $C))&&(rmatch($3 *dcc*))) { mode $safe($2) +v $3 } if ([$NOSIGNVAR]!=[ON]) { if ([$2]==[$C]) {/echo *** $3 \($4-\) has joined channel $C} {/echo *** $3 \($4-\) has joined channel $2\}} } } alias netpurge { purge isbroke purge splitname purge splittime purge signcross purge signoffs } alias lformat { @ IRCII.word = [$1-] if (@IRCII.word < [$0]) {@ function_return = [$([$0]IRCII.word)]} {@ function_return = [$IRCII.word]} } alias wholeft { foreach signoffs ii {/foreach signoffs.$ii jj {/pecho $lformat(15 $decode($ii)) $lformat(10 $decode($jj)) $splitname[$signoffs[$ii][$jj]]}} ^assign -ii ^assign -jj } # Flood Control Handlers by Fluff alias _floodcount { @COUNT = 0 @FOUND = 0 while ( COUNT <= XFLOODHIGH ) { if ( ARRAYFLOOD[$COUNT] > 0 ) { @ARRAYFLOOD[$COUNT] = ARRAYFLOOD[$COUNT] - 1 @FOUND = 1 } @COUNT = COUNT + 1 } if ( FOUND == 1 ) { timer 0 tref 613 2 _floodcount }{ if ( XFLOODLIM != XFLOODMAX ) { @ XFLOODLIM = XFLOODMAX pecho Repeated Flooding is over. Limit Raised\ to $XFLOODLIM\. } @XFLOODHIGH = -1 }} alias floodADD { @ARRAYFLOOD[$0] = ARRAYFLOOD[$0] + 1 @COUNT = [$0] if ( XFLOODHIGH < COUNT ) { @XFLOODHIGH = COUNT }} alias floodhCHECK { if ([$ARRAYFLOODHOST[$0]]!=hostonly($1)) { ^assign ARRAYFLOODHOST[$0] $hostonly($1) EVAL @REF = 63$0 tref $ref 30 ^assign -ARRAYFLOODHOST[$0] if ([$floodCHECK($0 $1)]) { @ FUNCTION_RETURN = 1 }{ @ FUNCTION_RETURN = 0 }}{ @ FUNCTION_RETURN = 0 }} alias floodCHECK { tref 613 2 _floodcount if ( ARRAYFLOOD[$0] > XFLOODLIM ) { if ( XFLOODLIM != XFLOODMIN ) { @ XFLOODLIM = XFLOODMIN pecho Repeated Flooding detected from $0: Limit Dropped\ to $XFLOODLIM\. } @ FUNCTION_RETURN = 0 }{ floodADD $0 @ FUNCTION_RETURN = 1 }} ### Flood Handling Routines (by Vassago) alias fcheck { @ FUNCTION_RETURN = 0 if (([$floodp]==[ON])&&(!match($decode($0) $flood_ok))) { if ((match(**** $3-))||(rindex($right(1 $3) $3) >= 200)) { ignore_flood $0 $1 $hostonly($2) clflood $1 @ FUNCTION_RETURN = 1 } if (match($_tflood $last$1)) { EVAL @ $1count = $($1count)+1 EVAL ^timer $resetcount subcnt $1 if ((msgcount==msgsensor)||(noticecount==noticesensor)||(ctcpcount==ctcpsensor)) { ignore_flood $0 $1 $hostonly($2) clflood $1 @ FUNCTION_RETURN = 1 }}{/clflood $1} ^assign _tflood $hostonly($2) ^assign last$1 $_tflood }} alias clflood { if ([$0]==[MSG]) {@ msgcount = 0;^assign -lastmsger} if ([$0]==[NOTICE]) {@ noticecount = 0;^assign -lastnoter} if ([$0]==[CTCP]) {@ ctcpcount = 0;^assign -lastctcper}} alias subcnt { if (([$0]==[MSG])&&(msgcount>0)) {@ msgcount = msgcount - 1} if (([$0]==[NOTICE])&&(noticecount>0)) {@ noticecount = noticecount - 1} if (([$0]==[CTCP])&&(ctcpcount>0)) {@ ctcpcount = ctcpcount - 1}} alias ignore_flood { EVAL //^ignore *@$2 $igtypes EVAL ^timer $getig() _igexp $0 $2 pecho $1 FLOOD DETECTED. From: $decode($0). Ignoring for $ig_count\ minutes\(s\). if ([$floodmsg]!=[]) {/nnotice $decode($0) $floodmsg} } alias _igexp { //^ignore *@$1 NONE pecho No longer ignoring $decode($0) [$1] \(expired\). } alias twink_flood { EVAL //^ignore $2 ALL EVAL ^timer $getig() _twinkexp $2 pecho $1 TWINK-FLOOD DETECTED. From: $decode($0) \[$2\]. pecho Ignoring for $ig_count\ minutes\(s\). if ([$floodmsg]!=[]) { /nnotice $decode($0) $1 - $floodmsg if ([$decode($0)]==[fluff]) { /nnotice $decode($0) $0 $1 -$2\- -$fuhost\- }} } alias _twinkexp { //^ignore $1 NONE pecho No longer twink-ignoring $decode($0) [$1] \(expired\). } ### FLOOD-OK List (by Vassago & Robey) alias fok { if ([$0]) { if (!match($0 $flood_ok)) { @ flood_ok = flood_ok ## [ $0] pecho Nick $0 now exempt from triggering flood protection. }{/pecho Nickname $0 is already on your flood ok list.}}{ pecho Nicknames exempt from triggering flood protection: pecho $flood_ok } if ([$1]) {/fok $1-}} alias frem { if ([$0]) { if (match($0 $flood_ok)) { @ flood_ok = rem_w($0 $flood_ok) pecho Nickname $0 has been removed from your flood_ok list. }{/pecho $0 is not on your flood_ok list.}} {/pecho Usage: /REMFLOOD <nick> of person to remove from flood_ok.} if ([$1]) {/frem $1-}} ### PUBLIC flood Protection (by Vassago & CKeeper) on ^public "% % ***" { if ([$floodp]==[ON]) { pubecho $0 $1 [Possible Tsunami] $msafe($2-) }{/pubecho $0 $1 $2-} if ([$cprot]==[ON]) {/pubact $0 $1}} on ^public "% % ***" { if ([$floodp]==[ON]) { pubecho $0 $1 [Excess Beeps] $msafe($2-) }{/pubecho $0 $1 $2-} if ([$cprot]==[ON]) {/pubact $0 $1}} ### Raw IRC CTCP/NOTICE Flood Protection (by Vassago) set INPUT_PROMPT <P-Loading CTCP Handlers> on ^raw_irc "*!*@* % % :*%INFO*" # on ^raw_irc "*!*@* % % :FINGER*" # on ^raw_irc "*!*@* % % :**" # on ^raw_irc "*!*@* % % :****" # on ^raw_irc "*!*@* % % :ERRMSG*" # on ^raw_irc "*!*@* % % :ECHO*" # on ^raw_irc "*!*@* % % :*[*" # on ^raw_irc "*!*@* % % :*ERRMSG *" # on ^raw_irc "*!*@* % % :UTC*" # on ^raw_irc "*!*@* % % :*DCC CHAT***DCC CHAT**" # on ^raw_irc "% PRIVMSG % :VERSION" { if ([$floodhCHECK(0 $0)]) { if ([$left(1 $2)]==[$]) {/pecho Server wide VERSION by $decode($enickonly($0)) on $strip(\$ $2).}{ if (rmatch($2 #*)) {/pecho $decode($enickonly($0)) requested version information for everyone in $2\.} {/pecho $decode($enickonly($0)) requested version information for you.} if ([$phoenix.ver]!=[]) {/nnotice $decode($enickonly($0)) VERSION $phoenix.ver\}} }} on ^raw_irc "% PRIVMSG % :PING *" { if ([$floodhCHECK(2 $0)]) { if ([$left(1 $2)]==[$]) {/pecho Server wide PING from $decode($enickonly($0))\ on $strip(\$ $2).}{ if (rmatch($2 #*)) {/pecho $decode($enickonly($0)) has pinged everyone in $2\.} {/pecho $decode($enickonly($0)) pinged you.} } /nnotice $decode($enickonly($0)) PING $time()\ }} on ^raw_irc "% NOTICE % :VERSION *" { if ([$floodCHECK(1 $0)]) { pecho Version\: $decode($enickonly($0))\: $strip( $4-) }} on ^raw_irc "% PONG % *" { if ([$0]==[$S]) { ^assign lagtime ${time()-mid(1 999 $3)} if (lagtime==0) {^set status_user E/X} {^set status_user Lag $lagtime - E/X} }{ if ([$floodhCHECK(8 $0)]) { pecho Pong\: $decode($enickonly($0))\ $strip( $4-) }}} on ^raw_irc "% NOTICE % :PING *" { if ([$floodCHECK(3 $0)]) { @ diff = [$time()] - [$4] if ( diff == 1 ) { pecho Ping\: $decode($enickonly($0))\: $diff second. }{ pecho Ping\: $decode($enickonly($0))\: $diff seconds. }}} # The Pong! reply really tells you nothing, since every client that # sends it also sends the above ping. on ^notice "% Pong!" # ### CTCP Commands/Responses (by Vassago) on -ctcp "*" { if ([$floodCHECK(4 $safe($userhost()))]) { if ([$1]==[$N]) { if ([$2]==[XDCC]) { ^assign DCCUSER $safe($Userhost()) /xdccmsg $0 $DCCUSER $3- } { if ([$inuse]==[]) { ^assign inuse YES ^assign ctcpadr $safe($Userhost()) if ([$fcheck($encode($0) CTCP $ctcpadr $2-)]==0) { if (!match($2 ACTION TIME UTC ERRMSG SED ECHO)) { if (rmatch($0!$ctcpadr $FRIENDLIST)) { if ([$3]) {^assign channel $3} {^assign channel $C} if ([$2]==[HELP]) {/ctcpcmd $0 HELP}{ if ([$chanpass($channel)]==[YES]) { if (match($2 INVITE OP VOICE)) { if ([$2]==[OP]) { if (rmatch($0!$ctcpadr $OPLIST)) { ctcpcmd $0 $2 ^assign TEMPYES ON }} if ([$2]==[VOICE]) { if (rmatch($0!$ctcpadr $VOICELIST)) { ctcpcmd $0 $2 ^assign TEMPYES ON }} if ([$2]==[INVITE]) { if (rmatch($0!$ctcpadr $INVITELIST)) { ctcpcmd $0 $2 ^assign TEMPYES ON }} if ([$TEMPYES]==[]) {/nnotice $0 You do not have access to command $2\.} {^assign -TEMPYES}} {/nnotice $0 $2 is not a valid CTCP command.}} {/nnotice $0 CTCP functions are not enabled for channel $channel\.} }}{ if (match($2 INVITE OP UNBAN)) { if ([$said_not]==[]) { ^assign said_not ON nnotice $0 You are not registered. tref 506 45 ^assign -said_not }} if (match($2 HELP)) { if ([$said_not]==[]) { ^assign said_not ON nnotice $0 Use /ctcp $N xdcc list for a list, /ctcp $N xdcc send #X for pack #X tref 506 45 ^assign -said_not }} pecho CTCP \($safe($[35]2-)\) from unregistered person $0\. }}} ^assign -inuse }}}}} # CTCP COMMAND Parser (by YaZoO & Vassago) alias ctcpcmd { if ([$ctcpauto]==[ON]) { if ([$1]==[OP]) { if (isop($N $channel)) { mmode $channel +o $0 if ([$phoenix.ver]) {/nnotice $0 You have been opped via Phoenix v2.27 with Fluff Mods v1.8.5} pecho $0 has been opped on $channel via a CTCP request. }{ nnotice $0 I am not an operator on channel $channel\. pecho $0 requested a CTCP Op on $channel\. }} if ([$1]==[VOICE]) { if (isop($N $channel)) { mmode $channel +v $0 if ([$phoenix.ver]) {/nnotice $0 You have been voiced via Phoenix v2.27 with Fluff Mods v1.8.5} pecho $0 has been voiced on $channel via a CTCP request. }{ nnotice $0 I am not an operator on channel $channel\. pecho $0 requested a CTCP VOICE on $channel\. }} if ([$1]==[INVITE]) { if (isop($N $channel)) { //^invite $0 $channel if ([$phoenix.ver]) {/nnotice $0 You have been invited via Phoenix v2.27 with Fluff Mods v1.8.5} pecho Inviting $0 under request from a CTCP. }{ nnotice $0 I am not a channel operator on $channel\. pecho $0 requested a CTCP invite to $channel\. }} if ([$1]==[HELP]) { nnotice $0 These commands are available via CTCP request: nnotice $0 /CTCP $N OP <#Channel> :For ops on <#Channel>. nnotice $0 /CTCP $N INVITE <#Channel> :For an invite to <#Channel>. nnotice $0 I am currently on channel\(s\): $tolower($strip(# $mychannels())) nnotice $0 Channel\(s\) on which these commands are active: $autochannels pecho $0 has asked for help from my Friends list. }}{ nnotice $0 Sorry, but my CTCP functions are currently disabled. pecho $0 tried $1 for $channel via CTCP. pecho CTCP functions are currently disabled. }} # Miscellaneous CTCP Handlers (by Vassago) on ^ctcp "% % DCC CHAT *" { if ([$floodCHECK(4 $safe($userhost()))]) { ^assign dccadr $safe($Userhost()) pecho DCC CHAT\ received from $0 \[$dccadr\] if ([$AUTOCHAT]==[ASK]) { ^assign _temp $"[E/X] Connect? " }{ if ([$AUTOCHAT]==[ON]) { ^assign _temp yes }{ ^assign _temp no }} if (rmatch($_temp y*)) { pecho Attempting DCC CHAT connection with $0. dcc chat $0}{ pecho Closing $0\'s DCC CHAT request. dcx $0} ^assign -_temp }} ### Invitation Handlers (by Vassago) on ^invite "*" { if ([$fcheck($encode($0) CTCP $safe($Userhost()) $1-)]==0) { if (rmatch($1 $false_chars)) {/pecho $0 invites you to channel $1\ \(Fake\)} {/echo *** $0 invites you to channel $1}} ^assign inv_chan $encode($1) } ### Fake Mode Handler (by YaZoO) on ^server_notice "*" # on ^server_notice "% % no% -- fake: *" { if (rmatch($7 $mychannels())) {/pecho [FAKE] $5 $7- from $0} } ### DCC Control Parsers (By Vassago, based on some stuff from YaZoO) on ^msg "% XDCC *" { if ([$floodCHECK(5 $safe($userhost()))]) { ^assign XDCCUSER $safe($userhost()) if ([$fcheck($encode($0) CTCP $XDCCUSER $2-)]==0) {/xdccmsg $0 $XDCCUSER $2-} }} on ^ctcp "% % XDCC *" { if ([$floodCHECK(4 $safe($userhost()))]) { ^assign DCCUSER $safe($userhost()) /xdccmsg $0 $DCCUSER $3- }} alias dccCHECK { @ FUNCTION_RETURN = 0 if ([$floodp]==[ON]) { if ((index(\;/\\\{\}~|\"~=\^ $4-)>=0)||(match($4 zero null core))) { ignore_flood $encode($0) DCC-SEND $dcc_ignore //^dcc close get $0 $4 @ FUNCTION_RETURN = 1 ^assign -dcc_ignore }}} alias debug { pecho =0[$0]=1[$1]=2[$2]=3[$3]=4[$4]=5[$5]=6[$6]=7[$7]=8[$8]=9[$9]=10[$10]=11[$11]=12[$12] } alias bd_handle { if ([$hostonly($1)]!=[$LASTBACKMSG]) { msg $1 Fluff Mods v1.8.5: $0\ detected. Send of $5 rejected. notice fluff X: $0- whois $1 whowas $1 //^dcc close get $1 $5 ^assign -dcc_ignore ^assign LASTBACKMSG $hostonly($1) tref 612 30 ^assign -LASTBACKMSG }} alias _exploit_clean { @ FUNCTION_RETURN = 0 if ([$BACKANAL]==[1]) {@ FUNCTION_RETURN = 1} { if ((index(& $4)>=0) && (index(\ $4)>=0)) { pecho AUTOGET EXPLOIT ATTEMPT by $0 - Execution:\ $0- bd_handle ShellEscape $0- }{ if (index(\ $4)>=0) { pecho AUTOGET EXPLOIT ATTEMPT by $0 - Special Character4:\ $0- bd_handle Pos4 $0- }{ if (index(\ $5)>=0) { pecho AUTOGET EXPLOIT ATTEMPT by $0 - Special Character5:\ $0- bd_handle Pos5 $0- }{ if (index(\ $6)>=0) { pecho AUTOGET EXPLOIT ATTEMPT by $0 - Special Character6:\ $0- bd_handle Pos6 $0- }{ @ BDC_A = [$[9]5] + 0 @ BDC_B = [$[9]6] + 0 @ BDC_C = [$[9]7] + 0 @ BDC_D = [$[9]8] + 0 @ BDC_E = [$[9]9] + 0 if ( (BDC_E != 0) ) { pecho IRC2-BUG Extra Info EXPLOIT ATTEMPT by $0 - Crash:\ $0- bd_handle Irc2ExtraCrashAttempt $0- if ( [$debugDCCSEND] == 1 ) { debug $0- } }{ if ( (BDC_A <= 0) ) { pecho IRC2-BUG EXPLOIT ATTEMPT by $0 - Crash:\ $0- bd_handle Irc2CrashAttempt $0- }{ if ( (BDC_C <= 0) ) { pecho IRC2-BUG EXPLOIT ATTEMPT by $0 - Size less than zero:\ $0- bd_handle Irc2NegativeSize $0- }{ if ( (BDC_B >= 65536 ) ) { pecho IRC2-BUG EXPLOIT ATTEMPT by $0 - Invalid port:\ $0- bd_handle Irc2InvalidPort $0- }{ @ TEMP = [$left(50 $4)] if ([$TEMP]!=[$4]) { pecho IRC2-BUG EXPLOIT ATTEMPT by $0 - Excess Length:\ $0- bd_handle Irc2LengthExceeded $0- }{ @ TEMP = [$left(50 $5)] if ([$TEMP]!=[$5]) { pecho IRC2-BUG EXPLOIT ATTEMPT by $0 - Excess Length:\ $0- bd_handle Irc2LengthExceeded $0- }{ @ TEMP = [$left(50 $6)] if ([$TEMP]!=[$6]) { pecho IRC2-BUG EXPLOIT ATTEMPT by $0 - Excess Length:\ $0- bd_handle Irc2LengthExceeded $0- }{ @ TEMP = [$left(50 $7)] if ([$TEMP]!=[$7]) { pecho IRC2-BUG EXPLOIT ATTEMPT by $0 - Excess Length:\ $0- bd_handle Irc2LengthExceeded $0- }{ @ FUNCTION_RETURN = 1 }}}}}}}}}}}}}} # This command also fixes the .* file bug in earlier IRCII clients. on ^window "% ??? DCC SEND* request received from *" # on ^ctcp "% % DCC SEND* * *" { if ([$floodCHECK(4 $safe($userhost()))]) { if ([$debugDCCSEND]==1) { debug $0- } if ([$1]==[$N]) { ^assign dcc_ignore $safe($userhost()) if ([$dccCHECK($0-)]==0) { if (_exploit_clean($0-)==1) { if ([$left(1 $4)]==[.]) {^assign oldfile _$mid(1 $index($right(1 $4)) $4)} {^assign oldfile $4} ^assign dccfile $xsafe($oldfile) if ([$dccfile]!=[$oldfile]) { pecho File contains strange characters:\ Stripping $oldfile to $dccfile } if (([$AUTOGET]==[ON])&&([$AUTOCLOSE]!=[ON])) { //^dcc rename $0 $oldfile $DOWNLOADDIR/$dccfile ^exec -name DCG$0/${DOWNLOADDIR}/$dccfile ls ${DOWNLOADDIR}/$dccfile }{ if ([$AUTOCLOSE]==[ON]) { pecho DCC SEND $dccfile from $0 request ignored and closed. //^dcc close get $0 $dccfile }{ if (([$AUTOGET]!=[ON])&&([$AUTOCLOSE]!=[ON])) { //^dcc rename $0 $dccfile $DOWNLOADDIR/$dccfile @ DCRSIZE = [$7] @ DCRSIZE = DCRSIZE / 1024 pecho DCC: $0\ has dcc'd you $dccfile\ [$DCRSIZE\k\] adddccrequest $DOWNLOADDIR/$dccfile $0 }}}} }}}} on ^exec_error "DCG* *" { @ dcclen = [$0] @ getf = [$right(${@dcclen-3} $0)] @ idx = [$index(/ $getf)] @ filenme = [$right(${@getf-idx+1} $0)] @ nicknme = [$left($idx $getf)] pecho I am autogetting $filenme from $nicknme\.\ //^dcc get $nicknme $filenme if ([$debugDCCSEND]==1){ pecho Snag Okay. } } on ^exec "DCG* *" { @ dcclen = [$0] @ getf = [$right(${@dcclen-3} $0)] @ idx = [$index(/ $getf)] @ filenme = [$right(${@getf-idx+1} $0)] @ nicknme = [$left($idx $getf)] if ([$OVERWRITE]==[ON]) { pecho Autogetting $filenme from $nicknme\ \(Overwriting file\). //^dcc get $nicknme $filenme }{ pecho $nicknme offered $filenme\ but it already exists. if ([$AUTORENAME]!=[ON]) { @ dctemp = [$"[E/X] Enter new filename or ENTER to close: "] if (dctemp!=[]) { if ([$[1]dctemp]!=[/]) {^assign dctemp ${downloaddir}/${dctemp}} pecho Getting $filenme renamed to $dctemp from $nicknme\. //^dcc rename $nicknme $filenme $dctemp //^dcc get $nicknme $dctemp }{ pecho Closing DCC GET request from $nicknme\. //^dcc close get $nicknme $filenme }}{ ^assign dctemp $filenme\.$rand(999) pecho Autorenaming to $dctemp\ and receiving. if ([$[1]dctemp]!=[/]) {^assign dctemp ${downloaddir}/${dctemp}} //^dcc rename $nicknme $filenme $dctemp //^dcc get $nicknme $dctemp }}} ### No such nick protection on ^window "% ??? * No such nick/channel" { if ( [$2]!=[$lastnosuch] ) { ^assign lastnosuch $2 echo $1- }} ### Server Connection ONs (by Vassago) on ^connect "*" {^timer 1 _connect $0-} on ^disconnect "*" {^timer 2 /areconnect} on ^window "% ??? Use /SERVER to*" if ([$1]==[***]) {^timer 2 /areconnect} on ^436 "*" {^timer 2 /areconnect} alias areconnect { pecho Connection closed. Autoconnecting to $_server\ if ([$RECONNECTING]==[]) { ^assign RECONNECTING YES tref 973 15 ^assign -RECONNECTING if ([$_server]!=[]) {/EVAL serv $_server}{/serv} }} ### Miscellaneous ON Commands (by TG, Mods by Vassago) on ^send_msg "*" { #echo <-[$0]-> $1- echo <*-[$0]-*> $1- ^addmsg $0 $msglist } on ^dcc_chat "*" echo =$0= $1- on ^send_action "*" { if ([$floodCHECK(7 $safe($userhost()))]) { if ([$[1]0]!=[#]) {/echo * $0 >> $N $1-} {/echo * $N $1-}}} on ^send_public "*" { if ([$PUBQUIET]==[]) { if ([$0]==[$C]) {/echo <${N}> $1-} {/echo -> <${N}> $1-} }} on ^send_dcc_chat "*" { echo <=$0=> $1- ^addmsg \=$0 $msglist } on ^action "*" { if ([$floodCHECK(7 $safe($userhost()))]) { if ([$[1]1]!=[#]) {/echo * $0 $2-} {/if ([$C]!=[$1]) {/echo * $1 >> $0 $2-} {/echo * $0 $2-} }}} on ^public_other "*" {/echo <$0/$1> $2-} on ^exec "from *" pecho Mail: From $safe($1-) on ^exec_error "from *" # on ^mail "*" { ^exec -name from frm | tail -$0 pecho You have new email! \(Mail Waiting: $1\) } ^on ^window "? ??? ?ecursive call to irc_io*" # ### Message Handler Commands (by Vassago) on ^msg "*" { if ([$floodCHECK(5 $safe($userhost()))]) { ^assign msghost $safe($Userhost()) if (fcheck($encode($0) MSG $msghost $1-)==0) { if (encode( *$0* $1-) != lmes) { if (extmes==[ON]) { if (miws) {^xecho -window Messages [$0:$safe($msghost)] $1-} {/echo [$0:$safe($msghost)] $1-} }{ if (miws) {^xecho -window Messages [$0:$safe($msghost)] $1-} {/echo [$0] $1-}}} if (isaway==[YES]) { ^exec echo "[$ftm($Z)] [$safe($0):$safe($msghost)] $safe($strip(! $1-))" >> $awayfle @ away_messages = away_messages + 1 } ^assign lmes $encode( *$0* $1-) }{^assign lmes $encode( *$0* [Flood Detected])} ^addmsg $0 $msglist }} alias dirlm { if ([$0]) {//msg $0 $strip( $decode($lmes))} {/say $strip( $decode($lmes))} } ### Notice Commands (by Vassago) on ^notice "*" { if ([$floodCHECK(6 $safe($userhost()))]) { if ([$fcheck($encode($0) NOTICE $safe($Userhost()) $1-)]==0) { if (rmatch($1 *WallOp*)) {/echo [-$0\-] $1-} {/echo -$0- $1-} ^assign lnotice $encode(-$0- $1-) } {^assign lnotice $encode(-$0- [Flood Detected])} ^addmsg $0 $msglist }} alias dirln { if ([$0]) {//msg $0 $strip( $decode($lnotice))} {/say $strip( $decode($lnotice))} } ### Timer/Idle Control on -timer "*" { ^ap ^netclean if (rmatch($0 %:00*)) {/pecho The time is now $0\.} } on -idle "*" { if (([$0]==[$idletime])&&([$isaway]==[NO])) { setaway $idlemes pecho Setting you away after being idle for $idletime minutes. }} ### Tabkey Handlers alias addmsg { @ matched = rmatch($0 $^\1-) if (matched) {@ msglist = [$(0-${matched-1}) $(${matched+1}-)]} {@ msglist = [$(0-${msgmax-1})]} @ msgcnt = 0 ^assign -matched } alias getmsg { @ msgcnt = msgcnt + [$0] if (#msglist < msgcnt) {@ msgcnt = 1} if (msgcnt <= 0) {@ msgcnt = #msglist} @ junk = K ## [m] //type ^U$junk $^^{[$($msgcnt)]} } ### Ban Handlers (by Vassago and Fred1) set INPUT_PROMPT <P-Loading Ban Handlers> alias bandef { if ([$0]==[N]) {@ bandef= [Normal]} if ([$0]==[H]) {@ bandef= [Host]} if ([$0]==[D]) {@ bandef= [Domain]} if ([$0]==[S]) {@ bandef= [Screw]} if (!match($bandef Normal Host Domain Screw)) {@ bandef= [Normal]} @ set.dfbt= left(1 $bandef) pecho Default ban is $set.dfbt \($bandef\). } alias ban { if ([$0]) { if (!rmatch($0 *!* *@* *.*)) { if ([$1]) { @ _t.who= [$1] @ _t.prm= mid(1 1 $0) }{ @ _t.who= [$0] @ _t.prm= set.dfbt } Userhost $_t.who -CMD if ([$4]!=[<UNKNOWN>]) { @ _t.ban= [] if (match($_t.prm S N H D)) {@ _t.ban= [$($_t.prm\ban($3 $4 *))]} if (!(_t.ban)) {@ _t.ban= nban($3 $4 *)} if (isop($0 $C)) {/mmode $C -o+b $0 $_t.ban} {/mmode $C +b $_t.ban} }{/pecho I couldn't find $0 on IRC.} }{/c +b $0-}}{/pecho Usage: /ban [<bantype>] <nick> }} alias bk { if ([$0]) { @ _t.prm= [$0] if (index(! $0)!=-1) { @ _t.prm= mid(1 1 $0) @ _t.who= [$1] @ _t.bkr= [$2-] }{ @ _t.prm= set.dfbt @ _t.who= [$0] @ _t.bkr= [$1-] } if (_t.bkr) {@ _t.bkr= [$_t.bkr\]} {@ _t.bkr= [$pk]} Userhost $_t.who -CMD if ([$3]!=[<UNKNOWN>]) { @ _t.ban= [] if (match($_t.prm S N H D)) {@ _t.ban= [$($_t.prm\ban($3 $4 *))]} if (!(_t.ban)) {@ _t.ban= nban($3 $4 *)} mmode $C -o+b $0 $_t.ban kkick $C $0 $_t.bkr }{/pecho I couldn't find $0 on IRC.} }{/pecho Usage: /bk [<BanType>] <Nick> [<Reason>] }} alias sban { @ cnt = 0 @ tomake = [$0@$1] @ temp = [$1] ^assign tomake $0@*$right(${@temp-index(. $1)} $1) ^assign -temp if ((mid($cnt 1 $0)==[~])||(mid($cnt 1 $0)==[#])) {@ cnt = 1} while (mid($cnt 1 $tomake)!=[]) { @ rnd = rand(10) if ((mid($cnt 1 $tomake)==[*])||(mid($cnt 1 $tomake)==[@])||(mid($cnt 1 $tomake)==[.])||(mid($cnt 1 $tomake)==[])||(mid($cnt 1 $tomake)==[])) {@ temp = [$temp$mid($cnt 1 $tomake)]} { if (rnd>4) {@ temp = [$temp?]} {@ temp = [$temp$mid($cnt 1 $tomake)] }} @ cnt = cnt + 1 } @ function_return = [*!*$temp] } alias nban @function_return= [$2!]##fixname($0 $2)##[@]##fixdomain($1 $2) alias hban @function_return= [$2!$2@]##fixhost($1 $2) alias dban @function_return= [$2!$2@]##fixdomain($1 $2) alias fixhost { if (index(. $0)==rindex(. $0)) {@ function_return= [$1] ## [$0]} {@ function_return= [$0]} } alias fixname { if (rmatch($0 ?? ?)) {@ function_return= [$1]} {@ function_return= [$1] ## mid(1 99 $0)} } alias fixdomain { if (index(. $0)!=rindex(. $0)) { if (is_ip($0)) {@ function_return= left($rindex(. $0) $0) ## [.$1]} {@ function_return= [$1$mid($index(. $0) 99 $0)]} } {@ function_return= [$1$0]} } alias is_ip { if ((right(1 $0) >= [0]) && (right(1 $0) <= [9])) {@ function_return= [1]} {@ function_return= [0]} } alias unbanlop { if ([$3]) { mmode $CHC -bbb $0 $1 $2 unbanlop $3- }{ if ([$2]) {/mmode $CHC -bbb $0 $1 $2}{ if ([$1]) {/mmode $CHC -bb $0 $1}{ if ([$0]) {/mmode $CHC -b $0}} }}} alias banlop { if ([$3]) { mmode $C +bbb $0 $1 $2 banlop $3- }{ if ([$2]) {/mmode $C +bbb $0 $1 $2}{ if ([$1]) {/mmode $C +bb $0 $1}{ if ([$0]) {/mmode $C +b $0 }}}}} alias dobans { pecho Doing bans in AutoBkick list. banlop $BKLIST } alias cdban { if ([$0]) { @CHC = [$0] }{ @CHC = [$C] } pecho Clearing $CHC of bans. ^assign -bunband ^on ^367 "*" {^assign bunband $2 ${bunband}} //^mode $CHC +b wait cdban2 $bunband } alias unban { if ([$1]) { @CHC = [$1] }{ @CHC = [$C] } if ([$0]) { ^assign -bunband if (!rmatch($0 *@* *!* *.*)) { Userhost $0 -CMD if ([$4]!=[<UNKNOWN>]) { ^assign dbanz $0!$3@$4 ^on ^367 "*" { if ((match($2 $dbanz))||(match($dbanz $2))) {^assign bunband $2 ${bunband}} } //^mode $CHC +b wait cdban2 $bunband nnotice $0 You have been unbanned\ on $CHC\\. }}} {/pecho Usage: /UNBAN <nick/filter> to unban on your current channel.}} alias cdban2 { unbanlop $0- ^on 367 - "*" } ### Status Screen alias status { pecho +-----------+ Your Current FPhoenix Configuration +-----------+ pecho CTCP Op/Invite : $ctcpauto pecho Setaway Time : $idletime pecho IRC Logging : $logirc pecho AutoRejoin on KICK : $rejoin pecho Extended Message Display : $extmes pecho Kick/MassDeop Protection : $prot pecho Personal Flood Protection : $floodp pecho Channel Protection : $cprot pecho Netsplit Hack Protection : $nhp pecho Ban/Bkick Type Setting : $bandef pecho FPhoenix SENSOR Settings: pecho Deop: $msensor Kick: $ksensor Nick Flood: $nicksensor pecho Message Flood: $msgsensor Notice Flood: $noticesensor pecho CTCP Flood: $ctcpsensor Timer resets after: $resetcount pecho Flood-triggered Ignores last $ig_count minutes. pecho Ignores stop: $igtypes\. pecho +-------+ Type /XDCC STATUS for XDCC information. +-------+ } ### Toggleable Commands alias upp { ^assign $0 $toupper($1) chgst } alias extmes { if (match($0 ON OFF)) {/upp extmes $0} pecho Extended messages display is $extmes\. } alias prot { if (match($0 ON OFF)) {/upp prot $0} pecho Megadeop/Kick Protection is $prot\. } alias nhp { if (match($0 ON OFF)) {/upp nhp $0} pecho Netsplit hack protection is $nhp\. } alias autoop { if (match($0 ON OFF)) {/upp autoop $0} pecho Auto OP friends on JOIN is $autoop\. } alias autovoice { if (match($0 ON OFF)) {/upp autovoice $0} pecho Auto VOICE friends on JOIN is $autovoice\. } alias auto { if (match($0 ON OFF)) {/upp ctcpauto $0} pecho CTCP op/invite is $ctcpauto\. if ([$1]) {^assign AutoChannels $tolower($strip(# $1-))} pecho AUTO functions will work in channels: $AutoChannels\ } alias autochan { if ([$0]) {^assign AutoChannels $tolower($strip(# $0-))} if ([$AutoChannels]!=[ALL]) {/pecho AUTO functions will work in: $AutoChannels\} {/pecho AUTO functions will work in ALL your current channels.} } alias quietdcc { if (match($0 ON OFF)) {/upp dccquiet $0} pecho Echo of XDCC requests suppressed: $dccquiet\. } alias floodp { if (match($0 ON OFF)) {/upp floodp $0} pecho Message/Notice/CTCP flood protection is $floodp\. } alias cprot { if (match($0 ON OFF)) {/upp cprot $0} pecho Channel flood/bomb protection is $cprot\. } alias rejoin { if (match($0 ON OFF)) {/upp rejoin $0} pecho AutoRejoin on kick is $rejoin\. } alias irclog { if (match($0 ON OFF)) { ^set log $0 upp logirc $0 } pecho The IRC Logfile is $logirc\. } alias autotime { if ([$0]!=[]) {^assign idletime $0} pecho Auto setaway idle time is $idletime\. } ### MDeop, MOp, MVoice, MRemoveVoice, LK, and MK (by YaZoO and Vassago) set INPUT_PROMPT <P-Loading Op Handlers> alias mass { if ([$0]) { if (([$0]!=[lk])&&([$0]!=[k])) { if ([$0]==[d]) {@ mass_mode = [-ooo];^on ^names "*" /findops $$1-\;^on ^names - "*"} { if ([$0]==[o]) {@ mass_mode = [+ooo]} if ([$0]==[v]) {@ mass_mode = [+vvv]} if ([$0]==[s]) {@ mass_mode = [-vvv]} if ([$mass_mode]!=[]) {^on ^names "*" /findnonops $$1-\;^on ^names - "*"} } //names $C cwait domassmode }{ if ([$0]==[lk]) { ^on ^names "*" {^assign lamkick $1-} ^names $C wait ^assign lktmp no @ lcnt = 0 pecho LKick started, please wait. while ([$(#lamkick)]>lcnt) { if (!match(@* $word($lcnt $lamkick))) { if ([$word($lcnt $lamkick)]!=[$N]) { if ([!$word($lcnt $lamkick)]!=[!]) { ^assign bkicked $word($lcnt $lamkick) ${bkicked} ^assign lktmp ppl }}} @ lcnt = lcnt + 1 } if ([$lktmp]==[ppl]) { @ lcnt = 0 while ([$(#bkicked)]>=lcnt) { kkick $C $word($lcnt $bkicked) $pk @ lcnt = lcnt + 1 } pecho $bkicked have been kicked from $C. } {/pecho Everyone is opped on $C\.} ^on names - "*" ^assign -bkicked ^assign -lcnt ^assign -lktmp } if ([$0]==[k]) { pecho Masskicking everyone from $C\. ^on ^441 "*" # ^on ^names "*" findops $$1- names $C cwait _kickcont }}}{ pecho Usage: /MASS <o,d,v,s,k,lk> - O to op all non channel ops, pecho d to deop all ops on the channel, v to give non-ops voice, pecho and s to remove voice from all non-ops \(silence\), lk to pecho mass kick all non-ops from the channel, and k to masskick pecho EVERYONE from your current channel. }} alias _kickcont { ^assign kicklist $mdchange kickthem ^assign -mdchange ^on ^names "*" findnonops $$1- names $C cwait _kickcont2 } alias _kickcont2 { ^assign kicklist $mdchange kickthem ^assign -mdchange ^on 441 - "*" ^on names - "*" } alias domassmode { @ mdchangecnt = 1 while ([$(#mdchange)]>=mdchangecnt) { mmode $C $mass_mode $decode($word(${mdchangecnt-1} $mdchange)) $decode($word($mdchangecnt $mdchange)) $decode($word(${mdchangecnt+1} $mdchange)) @ mdchangecnt = mdchangecnt + 3 } ^assign -mdchangecnt ^assign -mdchange ^assign -mass_mode } alias findops { if (([$[1]0] == [@]) && (match($0 @${N} $N)==0)) {^assign mdchange $encode($strip(@ $0)) ${mdchange}} if (([$[1]1] == [@]) && (match($1 @${N} $N)==0)) {^assign mdchange $encode($strip(@ $1)) ${mdchange}} if (([$[1]2] == [@]) && (match($2 @${N} $N)==0)) {^assign mdchange $encode($strip(@ $2)) ${mdchange}} if ([$3]) {/findops $3-} } alias findnonops { if (([$[1]0] != [@]) && (match($0 @${N} $N)==0)) {^assign mdchange $encode($strip(+ $0)) ${mdchange}} if (([$[1]1] != [@]) && (match($1 @${N} $N)==0)) {^assign mdchange $encode($strip(+ $1)) ${mdchange}} if (([$[1]2] != [@]) && (match($2 @${N} $N)==0)) {^assign mdchange $encode($strip(+ $2)) ${mdchange}} if ([$3]) {/findnonops $3-} } alias kickthem { @ mcnt = 0 if ([$kicklist]!=[]) { while ([$(#kicklist)]>mcnt){ kkick $C $decode($word($mcnt $kicklist)) $pk @ mcnt = mcnt + 1 if ([$(#kicklist)]>mcnt) { kkick $C $decode($word($mcnt $kicklist)) $pk @ mcnt = mcnt + 1 }}} ^assign -kicklist ^assign -mcnt } ### Other KICK Routines (by YaZoO, Mods by Vassago) alias fk { if ([$0]) { pecho FilterKick of $0 in $C started, please wait... ^assign fkfilt $0 ^on ^who "*" { if ((rmatch($1!$3@$4 $fkfilt))&&([$1]!=[$N])) {^assign ftbkick $encode($1) ${ftbkick}} } //who $C cwait dofilterkick }{/pecho Usage: /fk <hostname/*filter*>. Wildcards allowed.} } alias fbk { if ([$0]) { mmode $C +b $0 fk $0 }{/pecho Usage: /fbk <hostname/*filter*>. Wildcards allowed.} } alias dofilterkick { @ fkcnt = 0 while ([$(#ftbkick)]>fkcnt) { kkick $C $decode($word($fkcnt $ftbkick)) | Filter Kick $fkfilt | @ fkcnt = fkcnt + 1 } if ([$ftbkick]!=[]) {/pecho $fkcnt people kicked from $C with the filter $fkfilt\.} {/pecho No one matching filter $fkfilt is in channel $C\.} ^on who - "*" ^assign -ftbkick ^assign -fkfilt } alias k { if ([$0]) { if ([$1]) {/kkick $C $0 $1- } {/kkick $C $0 $pk} }{/pecho You must specify a nickname.} } ### Setaway & Setback Routines (by Vassago) alias setaway { if ([$0]!=[]) {^assign awreason $encode($0-)} {^assign awreason $encode($defumes)} //away $decode($awreason) \(Away since $ftm($Z) $left(10 $stime($time()))\) //me is away - $decode($awreason) - messages will be saved. ^assign isaway YES ^exec echo "[$left(10 $stime($time())) $ftm($Z)] Setaway: $safe($strip(! $decode($awreason))) " >> $awayfle @ away_messages = 0 } alias away if ([$0]!=[]) {/setaway $0-}{/setback} alias setback { ^assign isaway NO //me has returned. //away pecho You have $away_messages messages waiting. ^assign temp $"[E/X] Display message file? (y/n) " if (([$temp]==[y])||([$temp]==[yes])) {^exec cat $awayfle} ^assign temp $"[E/X] Save message file? (y/n) " if (([$temp]==[n])||([$temp]==[no])) { ^on ^exec_error "awayrm *" # ^exec -name awayrm rm $awayfle ^wait %awayrm ^on exec_error - "awayrm *" pecho Setaway message list has been deleted. }{/pecho Setaway message list has not been deleted.} @ away_messages = 0 ^assign -temp } ### Script Variable Save Aliases (by Vassago) alias adadddfriend { @ FRIENDS[$FRIENDADD] = [$0] @ FRIENDADD = FRIENDADD + 1 } alias adadddpriv { @ PRIVS[$PRIVADD] = [$0-] @ PRIVADD = PRIVADD + 1 } alias adadddenemy { @ ENEMIES[$ENEMYADD] = [$0] @ ENEMYADD = ENEMYADD + 1 } alias adadddcomment { @ COMMENTS[$COMMENTADD] = [$0-] @ COMMENTADD = COMMENTADD + 1 } alias save { pecho Save to $phoenixfile started, please wait... ^on ^exec_error "save *" # ^exec -name save mv $phoenixfile $phoenixbak wait %save ^on ^exec_error - "save *" ^exec -name exsve cat >> $phoenixfile wait ^on ^exec_error "exsve *" # ^writeln ### Master Script Save File for Phoenix Version 2.27 from Vassago ^writeln ### Last saved: $left(10 $stime($time())) at $ftm($Z) pecho Saving miscellaneous script settings... ^writeln # Miscellaneous Settings ^writest defumes $defumes ^writest idlemes $idlemes ^writest pk $pk ^writest signmsg $signmsg ^writest usermode $usermode ^writest idletime $idletime ^writest bandef $bandef ^writest set.dfbt $set.dfbt ^writest cstat $cstat ^writest extmes $extmes ^writest ctcpauto $ctcpauto ^writest autochannels $autochannels pecho Saving Flood/Mass Protection settings... ^writeln # Flood and Mass Protection Settings ^writest igtypes $igtypes ^writest prot $prot ^writest flood_ok $flood_ok ^writest floodp $floodp ^writest nhp $nhp ^writest cprot $cprot ^writest resetcount $resetcount ^writest ig_count $ig_count ^writest msensor $msensor ^writest ksensor $ksensor ^writest msgsensor $msgsensor ^writest noticesensor $noticesensor ^writest ctcpsensor $ctcpsensor ^writest nicksensor $nicksensor pecho Saving XDCC settings... ^writeln # XDCC Settings ^writest autoget $autoget ^writest autochat $autochat ^writest autodccvoice $autodccvoice ^writest autosend $autosend ^writest autoclose $autoclose ^writest autorename $autorename ^writest security $security ^writest uploaddir $UPLOADDIR ^writest downloaddir $DOWNLOADDIR ^writest dccminspeed $dccminspeed ^writest dcclimit $dcclimit ^writest dcctimelimit $dcctimelimit ^writest dccqmax $dccqmax pecho Saving Friends and AutoBkick lists... ^writeln # Friends List foreach FRIENDS XX {^writeln adadddfriend $FRIENDS[$XX]} foreach PRIVS XX {^writeln adadddpriv $PRIVS[$XX]} ^writeln # Auto BKick List foreach ENEMIES XX {^writeln adadddenemy $ENEMIES[$XX]} foreach COMMENTS XX {^writeln adadddcomment $COMMENTS[$XX]} ^writeln # Notify List pecho Saving notify list... @ notify_size = [$#notify.ex] @ notify_counter = 0 while (notify_counter < notify_size) { @ ind = 0 ^assign -notify_write while (ind < 7) { ^assign notify_write $notify_write $word($notify_counter $notify.ex) @ ind = ind + 1 @ notify_counter = notify_counter + 1 } ^writeln NOTIFY $notify_write } ^exec -CLOSE %exsve wait ^on ^exec_error - "exsve *" pecho Save has been completed. } alias writest { ^msg %exsve avar $0 $1- wait } alias writeln { ^msg %exsve $0- wait } ### AUTOBKICK LIST Routines (by Vassago) set INPUT_PROMPT <P-Loading Automatic Handlers> alias check_enemy { @ FUNCTION_RETURN = 0 foreach ENEMIES XX { if ((match($ENEMIES[$XX] $0))||(match($0 $ENEMIES[$XX]))) {@ FUNCTION_RETURN = 1} }} alias add_enemy { @ ENTMP = rand(9999) ^assign ENEMIES[$ENTMP] $0 makelists if ([$1]) { ^assign COMMENTS[$ENTMP] $1- pecho Added $0 to your AutoBKick list with comment: $1- }{/pecho Added $0 to your AutoBKick list with no comment.} } alias delete_enemy { foreach ENEMIES XX { if ((match($ENEMIES[$XX] $0))||(match($0 $ENEMIES[$XX]))) { pecho Match: Removing $ENEMIES[$XX] from list. ^assign -ENEMIES[$XX] ^assign -COMMENTS[$XX] makelists }}} alias addbk { if ([$0]) { if (rmatch($0 *@* *!* *.*)) { if ([$check_enemy($0)]==1) {/delete_enemy $0} add_enemy $0 $1- }{ pecho Searching for nickname $0\... ^assign tempcomment $1- Userhost $0 -CMD if ([$4]!=[<UNKNOWN>]) { ^assign TOADD $safe($3)@$4 if ([$check_enemy(*!*$TOADD)]==1) {/delete_enemy *!*$TOADD} add_enemy $nban($safe($3) $4 *) $tempcomment ^assign -TOADD ^assign -tempcomment }{/pecho I can't find $0 on IRC.} }}{ pecho Usage: /ADDBK <nick/filter> <comment> to add a nick/filt to your pecho AUTOBKICK list. You can place your bans in your bkick list by pecho typing /DOBANS. If someone joins one of your channels with a pecho user@host that matches in your list, they will be deopped, pecho banned, and kicked from the channel automatically. }} alias listbk { pecho Listing Enemies/Filters in your list: @ THELIST = 0 foreach ENEMIES XX { @ THELIST = THELIST + 1 if ([$COMMENTS[$XX]]!=[]) {/pecho #$THELIST $ENEMIES[$XX] \($COMMENTS[$XX]\)} {/pecho #$THELIST $ENEMIES[$XX]} } pecho End of AutoBKick list. A total of $THELIST people/filters. ^assign -THELIST } alias rembk { if ([$0]) { if ([$0]==[ALL]) { purge ENEMIES purge COMMENTS ^assign -BKLIST pecho Your AutoBkick list has been cleared. }{ if (rmatch($0 *@* *!* *.*)) { if ([$check_enemy($0)]==1) {/delete_enemy $0} {/pecho $0 is not in your AutoBKick list.} }{ Userhost $0 -CMD if ([$4]!=[<UNKNOWN>]) { ^assign TOREMOVE $safe($3)@$4 if ([$check_enemy(*!*$TOREMOVE)]==1) {/delete_enemy *!*$TOREMOVE} {/pecho *!*$TOREMOVE is not in your AutoBkick list.} ^assign -TOREMOVE }{/pecho I can't find $0 on IRC.}}}}{ pecho Usage: /REMBK <nick or filter to remove from Auto Bkick list>. pecho Type /REMBK ALL to clear your AutoBkick list. }} ### CTCP Friends List Functions (by Vassago) alias check_friend { @ FUNCTION_RETURN = 0 foreach FRIENDS XX { if ((match($FRIENDS[$XX] $0))||(match($0 $FRIENDS[$XX]))) {@ FUNCTION_RETURN = 1} }} alias add_friend { @ FRTMP = rand(9999) ^assign FRIENDS[$FRTMP] $0 setprivs $1- pecho Added $0 to your Friends list with pecho CTCP access of: $PRIVS[$FRTMP] makelists } alias delete_friend { foreach FRIENDS XX { if ((match($FRIENDS[$XX] $0))||(match($0 $FRIENDS[$XX]))) { pecho Match: Removing $FRIENDS[$XX] from list. ^assign -FRIENDS[$XX] ^assign -PRIVS[$XX] makelists }}} alias addf { if ([$0]) { if (rmatch($0 *@* *!* *.*)) { if ([$check_friend($0)]==1) {/delete_friend $0} add_friend $0 $1- }{ ^assign STUFF $1- pecho Searching for nickname $0\... Userhost $0 -CMD if ([$4]!=[<UNKNOWN>]) { ^assign TOADD $safe($3)@$4 if ([$check_friend($0!$TOADD)]==1) {/delete_friend $0!$TOADD} add_friend $nban($safe($3) $4 *) $STUFF nnotice $0 You have been added to my Friends list with CTCP nnotice $0 access of: $PRIVS[$FRTMP] nnotice $0 Type /CTCP $N HELP for more information. ^assign -STUFF ^assign -TOADD }{/pecho I can't find $0 on IRC.} }}{ pecho Usage: /ADDF <nick/filter> <privileges>. Available privileges are pecho INVITE, OP, VOICE, & XDCC. To give them all access, type /ADDF <nick/filt> pecho ALL. To change someone's privileges, just /ADDF them again. }} alias setprivs { ^assign -PRIVS[$FRTMP] if ([$0]) { if (match(INVITE $0-)) {@ PRIVS[$FRTMP] = PRIVS[$FRTMP] ## [INVITE ]} if (match(OP $0-)) {@ PRIVS[$FRTMP] = PRIVS[$FRTMP] ## [OP ]} if (match(VOICE $0-)) {@ PRIVS[$FRTMP] = PRIVS[$FRTMP] ## [VOICE ]} if (match(XDCC $0-)) {@ PRIVS[$FRTMP] = PRIVS[$FRTMP] ## [XDCC ]} if (match(ALL $0-)) {@ PRIVS[$FRTMP] = PRIVS[$FRTMP] ## [INVITE OP VOICE XDCC]} if (!match($0 OP INVITE ALL XDCC VOICE)) { pecho You must specify OP, INVITE, XDCC or ALL. pecho Setting privileges to INVITE and XDCC. \(default\). @ PRIVS[$FRTMP] = [INVITE XDCC] }}{@ PRIVS[$FRTMP] = [INVITE XDCC]}} alias listf { pecho Listing Friends/Filters in your list and their access: @ THELIST = 0 foreach FRIENDS XX { @ THELIST = THELIST + 1 pecho #$THELIST $FRIENDS[$XX] pecho Privileges: $PRIVS[$XX] } pecho End of Friends list. A total of $THELIST people. ^assign -THELIST } alias remf { if ([$0]) { if ([$0]==[ALL]) { purge FRIENDS purge PRIVS pecho Your friends list has been cleared. }{ if (rmatch($0 *@* *!* *.*)) { if ([$check_friend($0)]==1) {/delete_friend $0} {/pecho $0 is not on your Friends list.} }{ Userhost $0 -CMD if ([$4]!=[<UNKNOWN>]) { ^assign TOREMOVE $safe($3)@$4 if ([$check_friend($0!$TOREMOVE)]==1) {/delete_friend $0!$TOREMOVE} {/pecho $0!$TOREMOVE is not on your Friends list.} ^assign -TOREMOVE }{/pecho I can't find $0 on IRC.}}} }{ pecho Usage: /REMF <nick/filter to remove from Friends list>. pecho To clear your friends list, type /REMF ALL. }} alias makelists { ^assign -OPLIST ^assign -VOICELIST ^assign -FRIENDLIST ^assign -INVITELIST ^assign -SECLIST ^assign -BKLIST foreach FRIENDS ii { ^assign FTMP *$uhostonly($FRIENDS[$ii]) if (match(OP $PRIVS[$ii])) {@ OPLIST = OPLIST ## [$FTMP ]} if (match(VOICE $PRIVS[$ii])) {@ VOICELIST = VOICELIST ## [$FTMP ]} if (match(INVITE $PRIVS[$ii])) {@ INVITELIST = INVITELIST ## [$FTMP ]} if (match(XDCC $PRIVS[$ii])) {@ SECLIST = SECLIST ## [$FTMP ]} @ FRIENDLIST = FRIENDLIST ## [$FTMP ] } foreach ENEMIES ii {@ BKLIST = BKLIST ## [$ENEMIES[$ii] ]} } alias uhostonly { ^assign uhost_tmp $0 ^assign FUNCTION_RETURN $right(${@uhost_tmp-index(! $0)} $0) } ### Notify Functions on ^notify_signon "*" { if (V > 19931229) { if (!_n.list) {^timer -refnum 634 4 m.notify} ^assign _n.list $_n.list $0 }{ ^assign _n.list $0 m.notify }} alias m.notify { if (_n.list) { Userhost $_n.list -cmd if ([$4]!=[<UNKNOWN>]) { if ([$2] == [+]) {^assign tvar [Away]}{^assign -tvar} pecho Signon at $ftm($Z) for $0 [$userdomain($strip(#~\;\$ $3)@$4)] detected. $tvar ^assign -tvar }} ^assign -_n.list } on ^notify_signoff "*" pecho Signoff at $ftm($Z) for $0 detected. ### NOTIFY Alias (by Vassago, based on TG's code) alias notify { if ([$0]) { if ([$0]==[-]) { //notify - ^assign -notify.ex}{ if ([$left(1 $0)]==[-]) { //notify $0 ^assign notify.ex $rem_w($mid(1 1000 $0-) $notify.ex) if ([$1]) {/notify $1-}}{ ^assign notify.ex $notify.ex $strip(+ $0) //notify $0 if ([$1]) {/notify $1-}}}}{ pecho Notify List: $notify.ex //notify + }} ### Miscellaneous Functions (by Jeremy Nelson) alias rem_w { @ _pattern = rmatch($0 $1-) - 1 if (_pattern != -1) {@ function_return = notw($_pattern $1-)} {@ function_return = [$1-]} } alias notw { if ([$0]) {@ _pad = [ ]} {@ _pad = []} @ _words = [$1-] @ function_return = [$leftw($0 $1-)] ## [$_pad] ## [$restw(${[$0]+1} $1-)] } alias leftw {@ function_return = [$(1-$0)]} alias restw {@ function_return = [$(${[$0]+1}-)]} ### Message In Window function (by Zelix [Peter Handel]) alias miw { if (miws) { pecho Closing message-in-window. ^assign -miws ^window refnum Messages ^window kill Messages } { pecho Opening message-in-window. ^assign miws 1 ^window new name Messages ^window shrink 7 ^window scroll on ^window goto 2 }} ### Miscellaneous Aliases (Credit given where due) # Miscellaneous UNIX commands (so you can do stuff while in IRC) alias USERS exec users alias WHATIS exec whatis alias WHEREIS exec whereis alias DATE exec date alias TAR exec tar -cf $0.tar $0 alias UNTAR exec tar -xf alias SPING exec ping $0 | tail -2 alias WORDS exec wc alias UPTIME exec uptime alias RUP exec rup alias RUSERS exec rusers alias QUOTA exec quota -v alias SPACE exec du -s $HOME alias PS exec ps -x alias PS2 exec ps -u `whoami` alias KP exec kill -9 alias CAL exec cal alias LS exec ls -FC alias LSA exec ls -aFCs alias DIR exec ls -l alias NSLOOKUP exec nslookup alias FROM exec from alias FRM exec frm alias RM exec rm alias MV exec mv alias CP exec cp -r alias MKDIR exec mkdir alias GREP exec grep alias CHMOD exec chmod alias ZCAT exec zcat $0 alias FIND exec find $HOME -name $0 -print alias FILE exec file alias SORT exec sort alias UNCOMPRESS exec uncompress alias COMPRESS exec compress alias GZIP exec gzip alias GUNZIP exec gunzip alias MAIL exec mail $0 < $1 alias UUENCODE exec uuencode $0 $0 > $0.uue alias UUDECODE exec uudecode alias UNZIP exec zcat $0 | tar xf - alias CAT { if ([$0]) { @numberoflines = 0 @startingline = 0 @numlinesdisp = 0 ^assign fileview $0 ^assign startingline $1 ^assign numlinesdisp $2 ^on ^exec "nlines *" ^assign numberoflines $$1 ^exec -name nlines wc -l $fileview ^wait %nlines ^on exec - "nlines *" if ([$numlinesdisp] == [0]) {^assign numlinesdisp $numberoflines} if ([$startingline] == [0] && [$numlinesdisp] == [0]) {cat $fileview} { @tln = numberoflines - startingline exec tail -$tln $fileview | head -$numlinesdisp }}{ pecho Usage: /cat <filename> <starting line> <number of lines to display> }} # SCRIPTFIX command by Vassago, just in case you are running a client # that is partially incompatible with Phoenix and errors occur. alias scriptfix { ^set status_user E/X //away ^window refnum Messages ^window kill Messages @ mcount = 0 @ kcount = 0 @ dccsent = 0 @ dcccount = 0 @ nickcnt = 0 @ away_messages = 0 ^assign isaway NO ^assign -miws ^assign -flood_ok ^assign -lastver ^assign -lastchat ^assign -dccadr ^assign -inv_chan ^assign -nicknme ^assign -dctemp ^assign -filenme ^assign -lagtime ^assign -msglist ^assign -lmes ^assign -lnotice ^assign -msghost /clflood MSG /clflood NOTICE /clflood CTCP @ msgcount = 0 @ ctcpcount = 0 @ noticecount = 0 /makelists /chgst /_host EVAL $srand($time()) /quote MODE $N $usermode /pecho Master FPhoenix variables have been reset. } # Unflash command that should work on ALL clients (by CKeeper) alias unflash { if (V <= 19930629) { ^set status_clock c ^type ^L ^set status_clock \;\24r ^type ^L ^set status_clock m ^type ^L ^set status_clock ?5l ^type ^L sleep 1 ^set status_clock %T ^type ^L pecho Screen has been restored.}{ if ([$TTY]) { if (match(*/* $TTY)) {^assign MYTTY $TTY} {^assign MYTTY /dev/$TTY} ^exec -name unflash echo c >>$MYTTY ^exec -name unflash echo \\\;\24r >>$MYTTY ^exec -name unflash echo m >>$MYTTY ^exec -name unflash echo ?5l >>$MYTTY ^exec -name unflash reset >>$MYTTY wait -CMD %unflash if (1) {^type ^L;^assign -MYTTY;pecho Screen has been restored.}} {/pecho UNFLASH FAILED: Environment variable 'TTY' must be set to your TTY.}} } alias note if ([$0]) { eval ^exec -name exnote echo '[$newdate($time())] $0- ' >> $exnotes wait %exnote pecho Note stored in $exnotes\.}{ if ([$word(0 $"Do you want to see stored memos? ")]==[Y]) { pecho Saved notes: \(Reading file $exnotes\): ^on ^exec_error "exnote *" {/pecho Notes file \"$exnotes\" was not found.} eval ^exec -name exnote cat $exnotes wait %exnote ^on ^exec_error -"exnote *" }} alias finger { ^exec -kill %finger if (([$0]==[-h])&&([$1]!=[])) { Userhost $1 -cmd if ([$3] != [<UNKNOWN>]) { pecho Launching Host finger on: $0 -> @$4 ^eval exec -name finger exec finger @$$4 }{/pecho I can't find $0 on IRC.}}{ if (index(@ $0) > -1) {^exec -name finger exec finger $0}{ if ([$0]) { Userhost $0 -cmd if ([$3] != [<UNKNOWN>]) { pecho Launching finger on $0!$strip(#~!> $3)@$4 ^eval exec -name finger exec finger $strip(#~!> $3)@$$4 }{/pecho I can't find $0 on IRC.}} {/pecho Usage: /FINGER [[-h] <nickname>][[user]@full.hostname]} }}} alias _connect { pecho Connected to server $0, port $1. ^assign _server $0 $1 if ([$ISAWAY]!=[YES]) {//away} EVAL quote MODE $N $usermode } alias chgst { if ([$cstat]==[ON]) { ^assign ptmp $ptmp${TOTPACK}- ^assign ptmp $ptmp${GETCOUNT} if ([$AUTOGET] == [ON]) { ^assign ptmp ${ptmp}:G} { ^assign ptmp ${ptmp}:g} if ([$AUTOSEND] == [ON]) { ^assign ptmp ${ptmp}S} { ^assign ptmp ${ptmp}s} if ([$AUTOCLOSE] == [ON]) { ^assign ptmp ${ptmp}C} { ^assign ptmp ${ptmp}c} if ([$AUTORENAME]==[ON]) { ^assign ptmp ${ptmp}N} { ^assign ptmp ${ptmp}n} if ([$SECURITY]==[ON]) { ^assign ptmp ${ptmp}X} { ^assign ptmp ${ptmp}x} if ([$ctcpauto]==[ON]) { ^assign ptmp ${ptmp}A} { ^assign ptmp ${ptmp}a} if ([$LOGIRC] == [ON]) { ^assign ptmp ${ptmp}L} { ^assign ptmp ${ptmp}l} if ([$FLOODP]==[ON]) { ^assign ptmp ${ptmp}F} { ^assign ptmp ${ptmp}f} if ([$prot]==[ON]) { ^assign ptmp ${ptmp}M} { ^assign ptmp ${ptmp}m} if ([$cprot]==[ON]) { ^assign ptmp ${ptmp}P} { ^assign ptmp ${ptmp}p} if ([$nhp]==[ON]) { ^assign ptmp ${ptmp}H} { ^assign ptmp ${ptmp}h} if ([$rejoin]==[ON]) { ^assign ptmp ${ptmp}R} { ^assign ptmp ${ptmp}r} ^assign ptmp [${ptmp}]$OLD_STATUS ^set STATUS_FORMAT $ptmp ^assign -ptmp }{^set STATUS_FORMAT $OLD_STATUS}} alias _host { EVAL Userhost $N -CMD if ([$3]) {/EVAL ^assign ownadd $0!$strip(~ $3)@$4} {^timer 20 _host} } alias default { pecho Setting DEFAULT Script settings. pecho Enter deop sensitivity \(currently $msensor\). @ temp = [$"[E/X] Deop value: "] if (isnum($temp)==1){@ msensor = temp} pecho Enter kick sensitivity \(currently $ksensor\). @ temp = [$"[E/X] Kick value: "] if (isnum($temp)==1){@ ksensor = temp} pecho Enter nickname flood sensitivity \(currently $nicksensor\). @ temp = [$"[E/X] Channel Nickname Flood value: "] if (isnum($temp)==1){@ nicksensor = temp} pecho Enter message flood sensitivity \(currently $msgsensor\). @ temp = [$"[E/X] FloodP Msg Flood value: "] if (isnum($temp)==1){@ msgsensor = temp} pecho Enter notice flood sensitivity \(currently $noticesensor\). @ temp = [$"[E/X] FloodP Notice Flood value: "] if (isnum($temp)==1){@ noticesensor = temp} pecho Enter CTCP flood sensitivity \(currently $ctcpsensor\). @ temp = [$"[E/X] FloodP CTCP Flood value: "] if (isnum($temp)==1){@ ctcpsensor = temp} pecho Enter # of minutes auto-ignores should last \(currently $ig_count\). @ temp = [$"[E/X] Automatic ignores last <in minutes>: "] if (isnum($temp)==1){@ ig_count = temp} pecho Enter the # of seconds until the timer resets \(currently $resetcount\). @ temp = [$"[E/X] FloodP timer subtraction value: "] if (isnum($temp)==1){@ resetcount = temp} pecho Enter types of messages to be ignored by /IG or flood activation. pecho Valid: MSGS CTCP NOTICES WALLS WALLOPS INVITES NOTES PUBLIC CRAP, or ALL. pecho Currently: $igtypes @ temp = [$"[E/X] Ignore type\(s\): "] if (isalpha($temp)==1){@ igtypes = temp} pecho Enter your default kick message. pecho Currently: $pk @ temp = [$"[E/X] Default Kick Message: "] if (temp){@ pk = temp} pecho Enter your default /SETAWAY message. pecho Currently: $defumes @ temp = [$"[E/X] Default Setaway Message: "] if (temp){@ defumes = temp} pecho Enter your Auto-Setaway on Idle message. pecho Currently: $idlemes @ temp = [$"[E/X] Auto Setaway Message: "] if (temp){@ idlemes = temp} pecho Enter your default /SIGNOFF message. pecho Currently: $signmsg @ temp = [$"[E/X] Signoff Message: "] if (temp){@ signmsg = temp} pecho Enter the default usermode set on server CONNECT. \(Currently $usermode\) @ temp = [$"[E/X] Default Usermode: "] if (temp){@ usermode = temp} pecho Default settings complete. Type /SAVE to make them permanant. ^assign -temp } alias signoff { if ([$0]) { EVAL echo *** Signoff: $N \($0-\) //signoff $0-}{ EVAL echo *** Signoff: $N \($signmsg\) EVAL //signoff $signmsg }} alias cycle { pecho Cycling on channel $C\, one moment... ^assign tmpchan $C //part $C cwait //join $tmpchan ^assign -tmpchan } # Channel Stats Generator (by YaZoO) alias chanst { pecho Gathering information for channel $C\... if ([$0]) {^assign chnl $0} {^assign chnl $C} @ cnscnt = 0 @ opedpl = 0 @ unoppl = 0 @ awaypl = 0 @ herepl = 0 @ ircopl = 0 ^assign -ircopz ^on ^who "*" { if (index(@ $2)!=-1) {@ opedpl = opedpl + 1} {@ unoppl = unoppl + 1} if (index(H $2)!=-1) {@ herepl = herepl + 1} if (index(G $2)!=-1) {@ awaypl = awaypl + 1} if (index(* $2)!=-1) { @ ircopl = ircopl + 1 ^assign ircopz $1 ${ircopz} } @ cnscnt = cnscnt + 1 } //who $chnl cwait givestats } alias givestats { ^on who - "*" pecho Current channel statistics for $chnl pecho Total users: $cnscnt | Ops: $opedpl | Unopped: $unoppl pecho Users here: $herepl | Users Set Away: $awaypl if ([$ircopz]!=[]) {/pecho IRC Ops: $ircopl \( $ircopz\)} {/pecho IRC Ops: $ircopl } } alias bye { sf_assigning @ byecount = [$rand($byenum)] ^assign gone $(sf$byecount) signoff $gone } alias sf_assigning { ^assign byenum 50 @ sf1=[Sorrow paid for valor is too much to recall.] @ sf2=[Destiny, the crooked schemer, says the dead shall rise again.] @ sf3=[Demonic link?] @ sf4=[bad, Bad, REAL BAD link?] @ sf5=[Missing link?] @ sf6=[Where do we go from here?] @ sf7=[The end is finally here. God have mercy!] @ sf8=[Sweet taste of vindication, It turns to ashes in your mouth.] @ sf9=[If you're fighting to live, It's ok to die!] @ sf10=[Blue sky, Black death, I'm off to meet my maker!] @ sf11=[Jump or die!] @ sf12=[Feeling claustrophobic, like the walls are closing in.] @ sf13=[Killed (AliJah (Flood ME, will ya??!?@!@))] @ sf14=[Killed (GOD (Flood ME, will ya???!?@1!@1!!))] @ sf15=[Killed (MaSoNrY (Flood ME, will ya???!@?@!?@!))] @ sf16=[Killed (Fred1 (Flood ME, will ya?!@?@!?@!?@!))] @ sf17=[No escaping pain, you belong to me.] @ sf18=[I need a ride to the morgue, that's what 911 is for.] @ sf19=[That that doesn't kill me, only makes me stronger.] @ sf20=[Born from the dark, in the black cloak of night.] @ sf21=[Set the world Afire!!!] @ sf22=[They said it'd never come, we knew it was a lie.] @ sf23=[All forms of life die now, the humans all succumb.] @ sf24=[Time to kiss your ass goodbye, the end has just begun.] @ sf25=[No time to change your fate, no time left, it's too late.] @ sf26=[And if it comes, the living will envy the dead!] @ sf27=[No one will be left to prove the humans existed.] @ sf28=[We all live on one planet and it will all go up in smoke.] @ sf29=[And now the final scene, a global darkening...] @ sf30=[Einstein said `We'll use rocks on the other side'.] @ sf31=[Oh shit, cops at my door!1!!@!!1!1!@!@@1!!] @ sf32=[Badd link?] @ sf33=[Supercalifragilisticexpealidotious link?] @ sf34=[Killed (Vassago (Hey, who said you could use my script? :>))] @ sf35=[No Survivors!!!!!! Set the World Afire!!!!] @ sf36=[I walk, I walk alone, into the promised land...] @ sf37=[There's a better place for me, but it's far, far away...] @ sf38=[Everlasting life for me, in a perfect world.] @ sf39=[But the time has come when all things shall pass.] @ sf40=[This good thing passed away.] @ sf41=[I'm a child of the air, I'm a witch of the wind.] @ sf42=[Lie, steal and cheat, a real bad guy!] @ sf43=[I'm not a fish, I'm a man!] @ sf44=[Perhaps I'll try real life for awhile.] @ sf45=[Rot in hell, it's time you know...to your master, off you go!] @ sf46=[/<rad link?] @ sf47=[Illegal w00p by link?] @ sf48=[Excess Lameness] @ sf49=[Killed (Mom (Don't hang around with them! They're troublemakers!))] } ### Ignoring/Unignoring Functions (by Vassago) alias ig { if ([$0]) { if ([$1]) {^assign _types $1-} if (!rmatch($0 *!* *@* *.*)) { Userhost $0 -CMD if ([$4]!=[<UNKNOWN>]) { ^assign to_ignore *@$4 if ([$_types]) {//^ignore $to_ignore $_types} {//^ignore $to_ignore $igtypes} pecho Now ignoring $0 [$3@$4]. ^assign -_types }{/pecho I can't find $0 on IRC.} }{ if ([$_types]) {//^ignore $0 $_types} {//^ignore $0 $igtypes} pecho Now ignoring $0. ^assign -_types }}{/pecho Usage: /IG <nickname of person to ignore by user@hostmask>.} } alias noig { if ([$0]) { Userhost $0 -CMD if ([$4]!=[<UNKNOWN>]) { //^ignore $0 NONE //^ignore *@$4 NONE pecho $0 has been unignored. }{/pecho I can't find $0 on IRC.} }{/pecho Usage: /NOIG <nickname of person to unignore>.} } ### CHANNEL WALLOPS (by Eagle-1, Mods from Vassago) alias wall { if ([$C]==0) {/pecho You must be on a channel to use /WALL.}{ ^assign message $encode($0-) pecho [WallOp/$C] $decode($message) ^on ^names "*" sendwall $$1- ^names $C cwait ^on names - "*" }} alias sendwall { if ([$0]) { if (([$[1]0] == [@]) && ([$0] != [@] ## N)) { if ([$sendlist]==[]) { ^assign sendlist $strip(@ $0) sendwall $1- }{ ^assign sendlist $strip(@ $0),$sendlist sendwall $1- }}{/sendwall $1-}}{ if ([$sendlist]!=[]) { //^notice $sendlist [WallOp/$C] $decode($message) ^assign -sendlist }}} ### NET Alias for Window Control (by Vassago) alias net { if ([$0]) { pecho Hit CONTROL-W then ? for help on windowing commands. pecho Creating a window on server $0, please wait... ^window new if ([$1]) {/EVAL window server $0:$1::_$N} {/EVAL window server $0:6667::_$N}}{ pecho Usage: /net <server> [<port>] pecho /NET creates a new window and connects it to <server>. pecho CONTROL-W + <Letter> is used for most window commands: pecho ^W? - Shows you this help screen. pecho ^WK - kills the current window. pecho ^WH - hides the current window. pecho ^WS - shows and balances all windows. pecho ^WC - clears the current window. pecho ^WL - lists all windows. pecho ^WP - Goes to the previous window. pecho ^WN or /wn - Goes to the next window. pecho ^W<1-9> - Changes to window number <1-9>. pecho /wr <n> to reduce a window <n> number of lines. pecho /wg <n> to grow a window <n> number of lines. }} bind ^W meta2_character bind ^W? parse_command net bind ^Wh parse_command window hide bind ^Wn parse_command window next bind ^Wp parse_command window previous bind ^Wk parse_command window kill bind ^Wl parse_command window list bind ^Wc parse_command clear -a bind ^Ws parse_command win_show bind ^W1 parse_command window goto 1 bind ^W2 parse_command window goto 2 bind ^W3 parse_command window goto 3 bind ^W4 parse_command window goto 4 bind ^W5 parse_command window goto 5 bind ^W6 parse_command window goto 6 bind ^W7 parse_command window goto 7 bind ^W8 parse_command window goto 8 bind ^W9 parse_command window goto 9 alias wn window next alias wr window shrink alias wg window grow alias win_show { ^window show 2 ^window show 1 ^window balance } ### XDCC File Transfer Script (By XaBi, Extensive mods by Vassago) # This is NOT the original XDCC script - it's been modified many times # by me - XaBi's didn't have the counters or upload/download directories # and several other things I've added or changed to work better. # XDCC Counter/Limits/Idle Close (by Vassago) # Using On Windows is the ONLY way to do this correctly via script (sigh) set INPUT_PROMPT <P-Loading XDCC Basics> @dcchighspeed = 0 on ^window "% ??? DCC SEND:* %sec" if ([$1]==[***]) { echo $1- /subdccs @ VAL = [$7] @ VAL = VAL - 1 @ VAL = VAL + 1 if ( VAL > dcchighspeed ) { @dcchighspeed = VAL pecho New Record: $VAL\\kb/sec } } on -window "% ??? DCC SEND:* lost" if ([$1]==[***]) {/subdccs} on -window "% ??? DCC SEND:* closed" if ([$1]==[***]) {/subdccs} on -window "% ??? Unable to create connection:*" if ([$1]==[***]) {/subdccs} on -window "% ??? DCC SEND connection * established" if ([$1]==[***]) { #^assign XDCC_ACTIVE_CHECK YES #^timer 30 ^assign -XDCC_ACTIVE_CHECK } alias subdccs { if (dccsent > 0) {@ dccsent = dccsent - 1} if ([$gonnacount]==[]) { ^assign gonnacount ON ^timer 55 updatecount }} alias updatecount { if ([$counting]!=[ON]) { ^assign counting ON @ dccsent = 0 ^on ^window "*" {/if ([$1]==[SEND]) {@ dccsent = dccsent + 1}} //dcc list ^on window - "*" ^assign -counting ^assign -gonnacount }{^timer 30 updatecount} } alias iswaiting { ^assign counting ON ^assign dccfilename none ^assign liststarted no ^assign listdone no ^assign chnick $0 ^assign chfile $1 ^assign dccwaiting no ^on ^window "*" { if (([$listdone]==[no])&&([$liststarted]==[yes])) { if (([$1]==[SEND])&&([$2]==[$chnick])) { if ([$3]==[Waiting]&&(match(*$chfile $6)==1)){ ^assign dccwaiting yes ^assign dccfilename $6 }{ if ([$3]==[Active]&&(match(*$chfile $10)==1)){ @DCCWAITSIZE = [$8] ^assign dccwaiting active ^assign dccfilename $10 }} }}{ if (([$listdone]==[no])&&([$1]==[Type])&&([$2]==[nick])&&([$3]==[status])) {^assign liststarted yes}}} //dcc list ^on window - "*" if ([$liststarted]==[no]) {^assign dccwaiting dunno} ^assign -listdone ^assign -liststarted ^assign -chnick ^assign -chfile ^assign -counting } alias checksend { iswaiting $0 $1 if ([$dccwaiting]==[dunno]) {^timer 1 checksend $0 $1}{ if ([$dccwaiting]==[yes]) { ^timer 60 closesend $0 $1 if ([$lastnotdcc]!=[$0]) { Userhost $0 -CMD if ([$4]!=[<UNKNOWN>]) { nnotice $0 You have DCCs pending. Type /DCC GET $N\. }{ ^timer 1 closesend $0 $1 } ^assign lastnotdcc $0 tref 508 15 ^assign -lastnotdcc}}} ^assign -dccwaiting ^assign -dccfilename } alias checkspeed { iswaiting $0 $1 if ( [$dccwaiting]==[active]) { ^timer 20 __checkspeed $0 $1 $2 }{ if ( [$dccwaiting]==[yes]) { ^timer 2 checkspeed $0 $1 $2 }}} alias __checkspeed { iswaiting $0 $1 if ([$dccwaiting]==[active]) { @ DCCWAITSIZE = DCCWAITSIZE / 20 @ DCCWAITSIZE = DCCWAITSIZE / 1000 pecho MINSPEED: $0: $DCCWAITSIZE\ kb/sec [$1] @ ONESPEED = [$2] + 0 @ TOOSLOW = 0 if ( ONESPEED > 0 ) { if ( DCCWAITSIZE < ONESPEED ) { @ TOOSLOW = ONESPEED } }{ if ( (dccminspeed > 0) && (DCCWAITSIZE < dccminspeed) ) { @ TOOSLOW = dccminspeed }} if ( TOOSLOW > 0 ) { pecho MINSPEED: Speed less than $TOOSLOW\: Closing connection. nnotice $0 MINSPEED: $DCCWAITSIZE\kb/sec less than $TOOSLOW\kb/sec: Closing connection. ^dcs $0 $1 } }} alias closesend { iswaiting $0 $1 if ([$dccwaiting]==[dunno]) {^timer 1 closesend $0 $1} { if ([$dccwaiting]==[yes]) { Userhost $0 -CMD if ([$4]!=[<UNKNOWN>]) { nnotice $0 Timeout: $dccfilename } //^dcc close send $0 $dccfilename ^subdccs if ([$lastnotdcc]!=[$0]) { pecho One or more DCC SENDs to $0 have timed out. ^assign lastnotdcc $0 tref 509 30 ^assign -lastnotdcc}}} ^assign -dccfilename } alias clampsend { iswaiting $0 $1 if ([$dccwaiting]==[dunno]) {^timer 1 clampsend $0 $1} { if ([$dccwaiting]==[active]) { Userhost $0 -CMD if ([$4]!=[<UNKNOWN>]) { nnotice $0 Clamp Timeout: $dccfilename } //^dcc close send $0 $dccfilename ^subdccs pecho Clamp Timeout:\ DCC SEND to $0 timed out. }} ^assign -dccfilename } alias xdccmsg { timer 0 _xdccmsg $0- } alias _xdccmsg { if ([$hostonly($1)]!=[$LASTXDCCMSG]) { if (match($2 HELP LIST SEND QUEUE OVERVIEW)) {/$2COMMAND $0 $1 $3-} {/nnotice $0 Try /MSG $N XDCC HELP.} ^assign LASTXDCCMSG $hostonly($0) tref 510 5 ^assign -LASTXDCCMSG }} set INPUT_PROMPT <P-Loading XDCC Commands> alias HELPcommand { if ([$hostonly($1)]!=[$LASTHELPED]) { nnotice $0 /MSG $N XDCC LIST - to get the list of offered packs. nnotice $0 /MSG $N XDCC LIST #<N> - to get more info on pack #<N>. nnotice $0 /MSG $N XDCC SEND #<N> - to send pack #<N>. ^assign LASTHELPED $hostonly($1) tref 511 45 ^assign -LASTHELPED }} alias QUEUEcommand { if ([$hostonly($1)]!=[$lastqueuer]) { ^assign lastqueuer $hostonly($1) tref 610 15 ^assign -lastqueuer if (([$SECURITY]==[OFF])||([$sec_check($0!$1)] == [YES])) { qecho Queue listing request from $0 [$safe($1)] _qinform $0 nnotice $0 Queue Length: $QNICKMAX / $dccqmax @ QNICK = 1 while ( QNICK <= QNICKMAX ) { if ( QCOUNT[$QNICK] == 0 ) { ^timer $QNICK nnotice $0 #$QNICK $QUEUENICK[$QNICK]\: Empty. }{ if ( QCOUNT[$QNICK] == 1 ) { ^timer $QNICK nnotice $0 #$QNICK $QUEUENICK[$QNICK]\: 1 file. }{ ^timer $QNICK nnotice $0 #$QNICK $QUEUENICK[$QNICK]\: $QCOUNT[$QNICK] files. }} @ QNICK = QNICK + 1 }}}} alias __listcheck { if ( [$PLISTQUEUE] != [] ) { __listsend $PLISTQUEUE @ PLISTQUEUE = [] }} alias __listsend { @ COUNT0 = 1 @ _dcctemp = dcclimit - dccsent # nnotice $0 Pack Description\ _plistheader nnotice $0 $PLISTTMP __plistprepare while (COUNT0 <= TOTPACK) { __plistformat $COUNT0 nnotice $0 $PLISTFOR if ([$ARRAYNOTE[$COUNT0]] != []) { nnotice $0 \ ^-\ $ARRAYNOTE[$COUNT0] } @ COUNT0 = COUNT0 + 1 } sdcc nnotice $0 Total Offered: $OMegz\.$OMegRem\ MB Total Snagged: $LMegz\ MB } alias LISTcommand { if ([$hostonly($1)]!=[$lastlister]) { if (([$SECURITY]==[OFF])||([$sec_check($0!$1)] == [YES])) { _qinform $0 if ([$2]) { if ([$[1]2] == [#]) { @ TEMP = [$2] @ NUM = right(${@TEMP-index(# $2)+1} $2) if (NUM <= TOTPACK) { qecho List of pack #$NUM request received from $0. @ TEMPFILE = [] @ TEMPTOT = 0 @ COUNT0 = 1 nnotice $0 Pack: $ARRAYDESC[$NUM] nnotice $0 Length File while (COUNT0 <= ARRAYTOTF[$NUM]) { nnotice $0 $[10]ARRAYLENG[$NUM][$COUNT0] $X_FILE($ARRAYFILE[$NUM][$COUNT0]) @ TEMPTOT = TEMPTOT + ARRAYLENG[$NUM][$COUNT0] @ COUNT0 = COUNT0 + 1 } nnotice $0 ---------- ------------------------------------------------- nnotice $0 $[10]TEMPTOT $ARRAYTOTF[$NUM] file\(s\) :: $XDCCount[$NUM]\ Snags }{ nnotice $0 Pack $2 doesn't exist. Try /MSG $N XDCC LIST}} {/nnotice $0 XDCC LIST $2 is invalid. /MSG $N XDCC HELP.}}{ if (TOTPACK > 0) { qecho All pack list request from $0 [$safe($1)] @ PLISTQUEUE = [$PLISTQUEUE\,$0] }{/nnotice $0 No files offered.}} ^assign lastlister $hostonly($1) tref 512 15 ^assign -lastlister }{ nnotice $0 No files offered. pecho Unregistered XDCC LIST request from $0 [$Userdomain($1)] }}} alias OVERVIEWcommand { if ([$hostonly($1)]!=[$lastoverviewer]) { if (([$SECURITY]==[OFF])||([$sec_check($0!$1)] == [YES])) { if (TOTPACK > 0) { _qinform $0 qecho Overview request from $0 [$safe($1)] @ _dcctemp = dcclimit - dccsent _plistheader nnotice $0 $PLISTTMP sdcc nnotice $0 Total Offered: $OMegz\.$OMegRem\ MB Total Snagged: $LMegz\ MB } {nnotice $0 No files offered.}} ^assign lastoverviewer $hostonly($1) tref 611 15 ^assign -lastoverviewer }} alias SENDcommand { if ([$AUTOSEND] == [ON] || [$MYSEND] == [YES]) { if (([$SECURITY]==[OFF])||([$sec_check($0!$1)] == [YES])) { if (([$2]!=[])&&(isnum($2))&&(isalpha($2)==0)) { if ([$[1]2] == [#]) { @ TEMP = [$2] @ NUM = right(${@TEMP-index(# $2)+1} $2) if ((NUM > 0) && (NUM <= TOTPACK)) { @ dcctmp = dcclimit - dccsent @ COUNT1 = 1 @ TEMPTOT = 0 @ QPARTS = 0 @ EPARTS = 0 @ QFOUND = 1 # Let's see if the queue is full. if ( (dccqmax > 0) && (dccsent >= dcclimit) && (QNICKMAX >= dccqmax) ) { @ QFOUND = 0 while ( QNICK <= QNICKMAX ) { if ( [$0] == [$QUEUENICK[$QNICK]] ) { @ QNICK = QNICKMAX @ QFOUND = 1 } @ QNICK = QNICK + 1 } } if ( QFOUND == 0 ) { qecho Request denied: Queue full: $2\ to $0\ [$safe($1)] nnotice $0 All $dcclimit slots are full--queue of $QNICKMAX is full. Try again later. }{ while (COUNT1 <= ARRAYTOTF[$NUM]) { qpdcc send $0 $ARRAYFILE[$NUM][$COUNT1] $ARRAYSPEED[$NUM] @ TEMPTOT = TEMPTOT + ARRAYLENG[$NUM][$COUNT1] @ COUNT1 = COUNT1 + 1 } if ( QPARTS == 0 ) { qecho Sending $2\ to $0\ [$safe($1)] if ( EPARTS == 1 ) { nnotice $0 Sending\ you $ARRAYDESC[$NUM]\, which is one file. }{ nnotice $0 Sending\ you $ARRAYDESC[$NUM]\, which is $EPARTS\ files. }}{ if ( EPARTS == 0 ) { qecho Queuing $2\ to $0\ [$safe($1)] if ( QPARTS == 1 ) { nnotice $0 DCC Limit reached:\ Will send you $ARRAYDESC[$NUM]\, which is one file, when a slot opens. }{ nnotice $0 DCC Limit reached:\ Will send you $ARRAYDESC[$NUM]\, which is $QPARTS files, as slots open. } }{ @TPARTS = QPARTS + EPARTS qecho Sending $EPARTS\/$TPARTS of $2\ to $0\ [$safe($1)] nnotice $0 Sending\ you $EPARTS\ of $TPARTS\ files in $ARRAYDESC[$NUM]\. The last $QPARTS\ will follow as more slots open. }} @ XDCCount[$NUM] = XDCCount[$NUM] + 1 @ TEMPTOT = TEMPTOT / 1000 #nnotice $0 Total files: $ARRAYTOTF[$NUM]\. You'll need $TEMPTOT\kb free. }}{/nnotice $0 File $2 does not exist. /MSG $N XDCC LIST.} }{/nnotice $0 XDCC SEND $2 is invalid. /MSG $N XDCC HELP.}} {/nnotice $0 There is no such file.} }{ nnotice $0 There is no such file. pecho Unregistered user XDCC SEND request from $0 [$1].}}{ nnotice $0 That function has been disabled. } } alias xdcc { if (match($0 LOAD PSEND CLOSE SAVE GET DIR AUTOCLOSE AUTOCHAT AUTODCCVOICE HELP LIST PLIST SEND STATUS NOTICE OFFER DOFFER LIMIT MINSPEED PMIN QMAX TIMELIMIT AUTOGET AUTOSEND GLIST OVERWRITE ULDIR DLDIR AUTORENAME SEC NOTE DESC FILE)) {$0MCOMMAND $1-}{/HELPMCOMMAND} } alias LIMITmcommand { if ([$0]!=[]) { ^assign TMPLIMIT $0 } { ^assign TMPLIMIT $word(0 $"[E/X] Enter new limit for DCC SENDS: ") } if ([$TMPLIMIT]!=[]) { if (isnum($TMPLIMIT)) {@ dcclimit = TMPLIMIT} ^assign -TMPLIMIT } pecho XDCC Limit: $dcclimit\ } alias QMAXmcommand { if ([$0]!=[]) { ^assign TMPLIMIT $0 } { ^assign TMPLIMIT $word(0 $"[E/X] Enter new maximum number of people in the queue: ") } if ([$TMPLIMIT]!=[]) { if (isnum($TMPLIMIT)) {@ dccqmax = TMPLIMIT} ^assign -TMPLIMIT } if ( dccqmax == 0 ) { pecho XDCC Qmax: 0 - Unlimited\ }{ pecho XDCC Qmax: $dccqmax\ } } alias MINSPEEDmcommand { if ([$0]!=[]) { ^assign TMPLIMIT $0 } { ^assign TMPLIMIT $word(0 $"[E/X] Enter new minspeed for DCC SENDS in kb/sec: ") } if ([$TMPLIMIT]!=[]) { if (isnum($TMPLIMIT)) {@ dccminspeed = TMPLIMIT} ^assign -TMPLIMIT } pecho XDCC Minspeed: $dccminspeed\ kb/sec } alias TIMELIMITmcommand { if ([$0]!=[]) { ^assign TMPLIMIT $0 } { ^assign TMPLIMIT $word(0 $"[E/X] Enter new time limit for DCC SENDS (mins): ") } if ([$TMPLIMIT]!=[]) { if (isnum($TMPLIMIT)) {@ dcctimelimit = TMPLIMIT} ^assign -TMPLIMIT } pecho XDCC Timelimit: $dcctimelimit\ } alias PSENDmcommand { if (TOTPACK > 0) { @ TMPVAR = [] @ NICKLIST = [] if ([$0]!=[]) { ^assign TMPVAR $0 } { ^assign TMPVAR $"[E/X] Pack to send: " } if ([$TMPVAR]!=[]) { if (TMPVAR <= TOTPACK) { if ([$1]) { ^assign NICKLIST $1- } { ^assign NICKLIST $"[E/X] Nicks: " } if ([$NICKLIST]) { @ COUNT2 = 0 @ MYSEND = [YES] while (word($COUNT2 $NICKLIST)) { @ olddcclimit = dcclimit @ dcclimit = 999 SENDcommand $word($COUNT2 $NICKLIST) psend #$TMPVAR @ dcclimit = olddcclimit @ COUNT2 = COUNT2 + 1} @ MYSEND = [NO]}}{/pecho Pack #$TMPVAR doesn't exist. Try /XDCC LIST.}}} {/pecho There are no packs created.}} alias FILEmcommand { if ([$0]) { if ([$[1]0] == [#]) { @ TEMP = [$0] @ NUM = right(${@TEMP-index(# $0)+1} $0) if ( (NUM > 0) && (NUM <= TOTPACK)) { pecho Changing files for pack #$NUM ^assign -TMPVAR ^assign TMPVAR $"[E/X] Files: " if ([$TMPVAR]) { if ([$getdir()] == [OK]) { @ COUNT = 1 @ SENDTOTAL = 0 while (COUNT <= FILECOUNT) { @ ARRAYFILE[$NUM][$COUNT] = [$FILELIST[$COUNT]] @ ARRAYLENG[$NUM][$COUNT] = [$FILELENG[$COUNT]] @ SENDTOTAL = SENDTOTAL + FILELENG[$COUNT] @ ARRAYTOTF[$NUM] = [$FILECOUNT] @ ARRAYSPEED[$NUM] = 0 @ COUNT = COUNT + 1 } __calcsize $NUM LISTmcommand #$NUM }{ pecho File not found. }}}{ pecho There aren't that many packs offered. }}{ pecho Syntax: /xdcc file #X }}} alias NOTEmcommand { if ([$0]) { if ([$[1]0] == [#]) { @ TEMP = [$0] @ NUM = right(${@TEMP-index(# $0)+1} $0) if ( (NUM > 0) && (NUM <= TOTPACK)) { pecho Changing note for pack #$NUM ^assign -TMPNOTEM ^assign TMPNOTEM $"[E/X] Note: " @ ARRAYNOTE[$NUM] = [$TMPNOTEM] LISTmcommand #$NUM }{ pecho There aren't that many packs offered. }}{ pecho Syntax: /xdcc note #X }}} alias DESCmcommand { if ([$0]) { if ([$[1]0] == [#]) { @ TEMP = [$0] @ NUM = right(${@TEMP-index(# $0)+1} $0) if ( (NUM > 0) && (NUM <= TOTPACK)) { pecho Changing desc for pack #$NUM ^assign -TMPDESC ^assign TMPDESC $"[E/X] Description: " @ ARRAYDESC[$NUM] = [$TMPDESC] LISTmcommand #$NUM }{ pecho There aren't that many packs offered. }}{ pecho Syntax: /xdcc desc #X }}} alias PMINmcommand { if ([$0]) { if ([$[1]0] == [#]) { @ TEMP = [$0] @ NUM = right(${@TEMP-index(# $0)+1} $0) if ( (NUM > 0) && (NUM <= TOTPACK)) { pecho Changing minspeed for pack #$NUM ^assign -TMPDESC ^assign TMPDESC $"[E/X] Minspeed in kb/sec: " @ ARRAYSPEED[$NUM] = [$TMPDESC] LISTmcommand #$NUM }{ pecho There aren't that many packs offered. }}{ pecho Syntax: /xdcc pmin #X }}} alias LISTmcommand { if ([$0]) { if ([$[1]0] == [#]) { @ TEMP = [$0] @ NUM = right(${@TEMP-index(# $0)+1} $0) if (NUM <= TOTPACK) { @ COUNT2 = 1 @ TEMPTOT = 0 pecho PACK: $ARRAYDESC[$NUM] while (COUNT2 <= ARRAYTOTf[$NUM]) { pecho FILE: $ARRAYFILE[$NUM][$COUNT2] @ TEMPTOT = TEMPTOT + ARRAYLENG[$NUM][$COUNT2] @ COUNT2 = COUNT2 + 1 } pecho Total: $TEMPTOT Bytes on $ARRAYTOTF[$NUM] file\(s\) :: $XDCCount[$NUM] snags} {/pecho Pack $0 doesn't exist.} } {/pecho Usage: /XDCC LIST <Pack #>}}{ if (TOTPACK > 0) { @ COUNT2 = 1 #pecho Pack Description\ @ _dcctemp = dcclimit - dccsent _plistheader pecho $PLISTTMP ^assign -_dcctemp __plistprepare while (COUNT2 <= TOTPACK) { __plistformat $COUNT2 pecho $PLISTFOR if ([$ARRAYNOTE[$COUNT2]] != []) { pecho \ ^-\ $ARRAYNOTE[$COUNT2] } @ COUNT2 = COUNT2 + 1} sdcc #pecho $String pecho Total Offered: $OMegz\.$OMegRem\ MB Total Snagged: $LMegz\ MB } {/pecho There are no files offered. }}} alias NOTICEmcommand { if (TOTPACK > 0) { _plistheader //say $PLISTTMP\. Use "/msg $N xdcc list" for a detailed listing. }{ pecho You're not offering anything. }} alias pnotice NOTICEmcommand alias __plistprepare { @PREPCOUNT = 0 @PLISTSNAG = 1 while (PREPCOUNT <= TOTPACK) { if ( (XDCCount[$PREPCOUNT] >= 10000) && (PLISTSNAG <= 4) ) { @PLISTSNAG = 5 }{ if ( (XDCCount[$PREPCOUNT] >= 1000) && (PLISTSNAG <= 3) ) { @PLISTSNAG = 4 }{ if ( (XDCCount[$PREPCOUNT] >= 100) && (PLISTSNAG <= 2) ) { @PLISTSNAG = 3 }{ if ( (XDCCount[$PREPCOUNT] >= 10) && (PLISTSNAG <= 1) ) { @PLISTSNAG = 2 }}}} @PREPCOUNT = PREPCOUNT + 1 } } alias __plistformat { @NUM = [$0] if ( TOTPACK >= 10 ) {@PLISTC = [#$[2]NUM\]} {@PLISTC = [#$[1]NUM\] if ( PLISTSNAG == 1 ) {@PLISTSNAG = 2} } if ( PLISTSNAG == 5 ) {@PLISTD = [$[-5]XDCCount[$NUM]x]}{ if ( PLISTSNAG == 4 ) {@PLISTD = [$[-4]XDCCount[$NUM]x]}{ if ( PLISTSNAG == 3 ) {@PLISTD = [$[-3]XDCCount[$NUM]x]}{ if ( PLISTSNAG == 2 ) {@PLISTD = [$[-2]XDCCount[$NUM]x]} {@PLISTD = [$XDCCount[$NUM]x]} }}} @PLISTS = [$[-9]ARRAYSIZE[$NUM]] @PLISTFOR = [$PLISTC $PLISTD$PLISTS $ARRAYDESC[$NUM]] if ( ARRAYSPEED[$NUM] > 0 ) { @PLISTFOR = [$PLISTFOR |\\$ARRAYSPEED[$NUM]\kbs min\|\] } } alias _plistheader { @ _dcctemp = dcclimit - dccsent @PLISTTMP = [**\ $TOTPACK] if ( TOTPACK == 1 ) { @PLISTTMP = [$PLISTTMP pack] }{ @PLISTTMP = [$PLISTTMP packs] } @PLISTTMP = [$PLISTTMP **\ $_dcctemp\ of $dcclimit\ slots open] if ( QNICKMAX > 0 ) { if ( dccqmax > 0 ) { @PLISTTMP = [$PLISTTMP\, queue: $QNICKMAX\/$dccqmax\\.] }{ @PLISTTMP = [$PLISTTMP\, queue: $QNICKMAX\\.] }{ @PLISTTMP = [$PLISTTMP\.] }} if ( dccminspeed > 0 ) { @PLISTTMP = [$PLISTTMP Min: $dccminspeed\kb\\/s,] } @PLISTTMP = [$PLISTTMP Record: $dcchighspeed\kb\\/s] } alias PLISTmcommand { if (TOTPACK > 0) { ^assign PUBQUIET ON _plistheader if ([$0]) { if ([$1]==[AUTO]) { pecho Automatic Plist sent to $0\. msg $0 $PLISTTMP }{ pecho Plist sent to $0\. _qinform $0 nnotice $0 $PLISTTMP } }{ pecho Plist sent to $C\. //say $PLISTTMP } ^assign -_dcctemp @ COUNT3 = 1 __plistprepare while (COUNT3 <= TOTPACK) { __plistformat $COUNT3 if ([$0]) { if ([$1]==[AUTO]) { msg $0 $PLISTFOR }{ nnotice $0 $PLISTFOR }}{ //say $PLISTFOR } if ([$ARRAYNOTE[$COUNT3]] != []) { @ PLISTNOTE = [\ ^-\ $ARRAYNOTE[$COUNT3]] if ([$0]) { if ([$1]==[AUTO]) { msg $0 $PLISTNOTE }{ nnotice $0 $PLISTNOTE }}{ //say $PLISTNOTE } } @ COUNT3 = COUNT3 + 1 } ^assign -PUBQUIET #sdcc }{/pecho There are no files offered.}} alias SENDmcommand { @ NICKLIST = [] @ TMPVAR = [] if ([$0]) {@ TMPVAR = [$0]} {^assign TMPVAR $"[E/X] Files to send: "} if ([$TMPVAR]!=[]) { if ([$getdir()] == [OK]) { if ([$1]) {@ NICKLIST = [$1-]} {^assign NICKLIST $"[E/X] Nicks: " } if ([$NICKLIST]!=[]) { dosend pecho Send finished. }}{/pecho Please check the files.}}} set INPUT_PROMPT <P-Loading XDCC Queues> alias getdir { @ FILECOUNT = 0 ^on -exec_error "DIR1 *" {/pecho Error: $1-} ^on ^exec "DIR1 *" addfile $$1- @ COUNT4 = 0 while (word($COUNT4 $TMPVAR)) { @ TMPFILE = word($COUNT4 $TMPVAR) if ([$[1]TMPFILE] == [/]) {} { @ TMPFILE = [$UPLOADDIR/$TMPFILE] } ^exec -name DIR1 ls -ld $TMPFILE ^wait %DIR1 @ COUNT4 = COUNT4 + 1 } if ( FILECOUNT == 0 ) { @ function_return = [ERROR] } { @ function_return = [OK] }} alias addfile { if ([$[1]0] == [-]) { @ FILECOUNT = FILECOUNT + 1 if ([$8]) { @ FILELIST[$FILECOUNT] = [$8] @ FILELENG[$FILECOUNT] = [$4] } { @ FILELIST[$FILECOUNT] = [$7] @ FILELENG[$FILECOUNT] = [$3] }}} alias dosend { @ COUNT5 = 0 while (word($COUNT5 $NICKLIST)) { @ COUNT6 = 1 @ SENDTOT = 0 while (COUNT6 <= FILECOUNT) { ^edcc send $word($COUNT5 $NICKLIST) $FILELIST[$COUNT6] @ SENDTOT = SENDTOT + FILELENG[$COUNT6] @ COUNT6 = COUNT6 + 1 } nnotice $word($COUNT5 $NICKLIST) $SENDTOT Bytes in $FILECOUNT file\(s\). @ COUNT5 = COUNT5 + 1 }} alias qpdcc { if ( dccsent < dcclimit ) { @EPARTS = EPARTS + 1 edcc $0- }{ @QPARTS = QPARTS + 1 ^qdcc $0- } } alias qdcc { @ QNICK = 1 @ QFOUND = 0 while ( ( QNICK <= QNICKMAX ) && ( QFOUND == 0 ) ) { if ( [$1] == [$QUEUENICK[$QNICK]] ) { @ QFOUND = 1 }{ @ QNICK = QNICK + 1 } } @ QSAME = 0 if ( QFOUND == 0 ) { @ QNICKMAX = QNICKMAX + 1 @ QNICK = QNICKMAX @ QCOUNT[$QNICK] = 0 @ QUEUENICK[$QNICK] = [$1] ^timer 3 _qinform $1 REPEAT }{ @ QFILE = 1 while ( QFILE <= QCOUNT[$QNICK] ) { if ( [$QUEUEFILE[$QNICK][$QFILE]] == [$2] ) { @QSAME = 1 } @ QFILE = QFILE + 1 } if ( QSAME == 1 ) { ^timer 1 pecho Queue: $2 is already in the queue for $1 ^timer 1 nnotice $1 Queue: $2 is already in your queue. It will be sent as slots open. } } if ( QSAME == 0 ) { @ QCOUNT[$QNICK] = QCOUNT[$QNICK] + 1 @ QUEUEFILE[$QNICK][$QCOUNT[$QNICK]] = [$2] @ QUEUESPEED[$QNICK][$QCOUNT[$QNICK]] = [$3] # pecho Queuing: $QUEUENICK[$QNICK] \(Pri: $QNICK / $dcclimit\): $QUEUEFILE[$QNICK][$QCOUNT[$QNICK]] pos $QCOUNT[$QNICK] }} alias qcancel { if ( [$0] == [] ) { pecho You must specify a nick to cancel or * to cancel it all. }{ if ( [$0] == [] ) { @ QNICKMAX = 0 pecho Entire queue deleted. }{ @ QNICK = 1 @ QFOUND = 0 while ( QNICK <= QNICKMAX ) { if ( [$0] == [$QUEUENICK[$QNICK]] ) { @ QCOUNT[$QNICK] = 0 @ QFOUND = 1 pecho Deleting all files for $0 } @ QNICK = QNICK + 1 } if ( QFOUND == 0 ) { pecho $0 doesnt have any files in the queue. Try /qlist. }}}} alias _qclean { @ QNICK = 1 pecho QCleaning. while ( QNICK <= QNICKMAX ) { if ( QCOUNT[$QNICK] == 0 ) { pecho Removed $QUEUENICK[$QNICK] @ QPRI = QNICK @ QNICKMAX = QNICKMAX - 1 while ( QPRI <= QNICKMAX ) { @ QCOPY = QPRI + 1 @ QUEUENICK[$QPRI] = [$QUEUENICK[$QCOPY]] @ QCOUNT[$QPRI] = QCOUNT[$QCOPY] @ QFILE = 1 while ( QFILE <= QCOUNT[$QPRI] ) { @ QUEUEFILE[$QPRI][$QFILE] = [$QUEUEFILE[$QCOPY][$QFILE]] @ QUEUESPEED[$QPRI][$QFILE] = QUEUESPEED[$QCOPY][$QFILE] @ QFILE = QFILE + 1 } @ QPRI = QPRI + 1 } } @ QNICK = QNICK + 1 } } alias qlist { @ QNICK = 1 if ( QNICKMAX == 0 ) { pecho The queue is empty. }{ while ( QNICK <= QNICKMAX ) { @ QFILE = 1 if ( QCOUNT[$QNICK] == 0 ) { pecho #$QNICK $QUEUENICK[$QNICK]\: Empty. }{ if ( QCOUNT[$QNICK] == 1 ) { pecho #$QNICK $QUEUENICK[$QNICK]\: 1 file. }{ pecho #$QNICK $QUEUENICK[$QNICK]\: $QCOUNT[$QNICK] files. }} while ( QFILE <= QCOUNT[$QNICK] ) { pecho File $[2]QFILE: $QUEUEFILE[$QNICK][$QFILE] @ QFILE = QFILE + 1 } @ QNICK = QNICK + 1 } } } alias _qinform { @ QNICK = 1 while ( QNICK <= QNICKMAX ) { if ( [$0] == [$QUEUENICK[$QNICK]] ) { fnotice $0 You are in queue position $QNICK of $QNICKMAX\. if ( [$1] == [REPEAT] ) { ^timer 120 _qinform $0- } } @ QNICK = QNICK + 1 } } alias _subqcheck { if ( QCOUNT[1] <= 0 ) { @ QPRI = 1 @ QNICKMAX = QNICKMAX - 1 while ( QPRI <= QNICKMAX ) { @ QCOPY = QPRI + 1 @ QUEUENICK[$QPRI] = [$QUEUENICK[$QCOPY]] @ QCOUNT[$QPRI] = QCOUNT[$QCOPY] @ QFILE = 1 while ( QFILE <= QCOUNT[$QPRI] ) { @ QUEUEFILE[$QPRI][$QFILE] = [$QUEUEFILE[$QCOPY][$QFILE]] @ QUEUESPEED[$QPRI][$QFILE] = QUEUESPEED[$QCOPY][$QFILE] @ QFILE = QFILE + 1 } @ QPRI = QPRI + 1 } ^assign -QCHECKING }{ Userhost $QUEUENICK[1] -CMD if ([$4]!=[<UNKNOWN>]) { @ QTARGET = [$QUEUENICK[1]] @ QFNAME = [$QUEUEFILE[1][1]] @ QFSPEED = QUEUESPEED[1][1] pecho Offering queued file: $QFNAME to $QTARGET\. edcc SEND $QTARGET $QFNAME $QFSPEED @ QFILE = 1 @ QCOUNT[1] = QCOUNT[1] - 1 while ( QFILE <= QCOUNT[1] ) { @ QCOPY = QFILE + 1 @ QUEUEFILE[1][$QFILE] = [$QUEUEFILE[1][$QCOPY]] @ QUEUESPEED[1][$QFILE] = QUEUESPEED[1][$QCOPY] @ QFILE = QCOPY } ^assign -QCHECKING }{ @ QCOUNT[1] = 0 _subqcheck } } } alias qcheck { if ( (dccsent < dcclimit) && (QNICKMAX > 0) ) { if ( [$QCHECKING] != [YES] ) { ^assign QCHECKING YES _subqcheck ^timer 2 qcheck } }} alias qtimer { qcheck __listcheck ^timer 10 qtimer } alias edcc { iswaiting $1 $2 if ([$dccwaiting]==[yes]) { pecho Already trying to send:\ Closing and Resending $2 to $1. nnotice $1 Already trying to send:\ Closing and Resending $2. ^dcs $1 $2 updatecount } if ([$dccwaiting]==[active]) { pecho Already sending $1 $2.\ nnotice $1 Already sending you $2.\ }{ ^timer 0 //^dcc $0 $1 $2 if ([$0]==[SEND]) { @ dccsent = dccsent + 1 # reminder message ^timer 60 checksend $1 $2 # Don't let any transfers last longer than timelimit if ( dcctimelimit > 0 ) { @ secwait = dcctimelimit * 60 ^timer $secwait clampsend $1 $2 } # Slow-dcc abort if ( dccminspeed > 0 ) { ^timer 3 checkspeed $1 $2 } if ( [$3] != [] ) { ^timer 3 checkspeed $1 $2 $3 }}}} alias STATUSmcommand { pecho +--------+ Current XDCC Configuration +--------+ pecho Autoget Offered DCCs $AUTOGET pecho Autochat DCC CHATS $AUTOCHAT pecho Autovoice DCC in nick $AUTODCCVOICE pecho Autosend from List $AUTOSEND pecho Autoclose DCC SENDS $AUTOCLOSE pecho Overwrite existing files $OVERWRITE pecho AutoRename existing files $AUTORENAME pecho Files Offered $TOTPACK pecho Get Count $GETCOUNT pecho Upload Directory $UPLOADDIR pecho Download directory $DOWNLOADDIR pecho Quiet $dccquiet pecho Limit $dcclimit pecho Minspeed $dccminspeed kb/sec pecho Timelimit $dcctimelimit mins if ( dccqmax == 0 ) { pecho Qmax Unlimited }{ pecho Qmax $dccqmax people } pecho Pstatus $pstatus pecho Ptime $pminutes mins pecho Pchannels $plisting\ pecho +----------------------------------------------+ } alias __calcsize { @ SIZECOUNT = 1 @ SENDTOTAL = 0 @ NUM = [$0] if (NUM <= TOTPACK) { while (SIZECOUNT <= ARRAYTOTF[$NUM]) { @ SENDTOTAL = SENDTOTAL + ARRAYLENG[$NUM][$SIZECOUNT] @ SIZECOUNT = SIZECOUNT + 1 } @ BYTETOTAL = SENDTOTAL @ SENDTOTAL = SENDTOTAL / 1000 if (SENDTOTAL >= 1000) { @ MEGTOTAL = SENDTOTAL / 1000 @ LEFTTOTAL = MEGTOTAL * 1000 @ SENDTOTAL = SENDTOTAL - LEFTTOTAL @ SENDTOTAL = SENDTOTAL / 100 @ ARRAYSIZE[$NUM] = [\[$MEGTOTAL\.$SENDTOTAL\M\]] }{ if ( SENDTOTAL >= 1 ) { @ ARRAYSIZE[$NUM] = [\[$[-3]SENDTOTAL\k\]] }{ @ ARRAYSIZE[$NUM] = [\[$[-3]BYTETOTAL\b\]] } }}{ pecho __Calcsize: Error: Attmempt to compute for pack $NUM }} alias OFFERmcommand { @ TMPVAR = [] @ TMPDESC = [] ^assign TMPVAR $"[E/X] Files: " if ([$TMPVAR]) { if ([$getdir()] == [OK]) { ^assign TMPDESC $"[E/X] Description: " if ([$TMPDESC]) { @ TOTPACK = TOTPACK + 1 @ COUNT = 1 @ SENDTOTAL = 0 while (COUNT <= FILECOUNT) { @ ARRAYFILE[$TOTPACK][$COUNT] = [$FILELIST[$COUNT]] @ ARRAYLENG[$TOTPACK][$COUNT] = [$FILELENG[$COUNT]] @ ARRAYTOTF[$TOTPACK] = [$FILECOUNT] @ ARRAYSPEED[$TOTPACK] = 0 @ COUNT = COUNT + 1 } @ ARRAYDESC[$TOTPACK] = [$TMPDESC] __calcsize $TOTPACK ^assign -TMPNOTE ^assign TMPNOTE $"[E/X] Note: " if ([$TMPNOTE]) { @ ARRAYNOTE[$TOTPACK] = [$TMPNOTE] }{ @ ARRAYNOTE[$TOTPACK] = [] } pecho $FILECOUNT\ file\(s\) added to Pack #$TOTPACK\. chgst}{} @ ARRAYSPEED[$TOTPACK] = 0 @ XDCCount[$TOTPACK] = 0 } {/pecho One or more of these files don't exist.}}} alias DOFFERmcommand { if (TOTPACK > 0) { @ TMPNUM = [] if ([$0]) { ^assign TMPNUM $0 } { ^assign TMPNUM $"[E/X] Pack to remove (* for all): " } if ([$TMPNUM]) { if ([$TMPNUM] == [*]) { @ TOTPACK = 0 chgst pecho All packs removed from offer list. } { if ((TMPNUM <= TOTPACK) && (TMPNUM > 0)) { @ COUNT7 = TMPNUM while (COUNT7 < TOTPACK) { @ COUNT8 = ARRAYTOTF[${COUNT7+1}] while (COUNT8 > 0) { @ ARRAYFILE[$COUNT7][$COUNT8] = [$ARRAYFILE[${COUNT7+1}][$COUNT8]] @ ARRAYLENG[$COUNT7][$COUNT8] = [$ARRAYLENG[${COUNT7+1}][$COUNT8]] @ COUNT8 = COUNT8 - 1 } @ ARRAYDESC[$COUNT7] = [$ARRAYDESC[${COUNT7+1}]] @ ARRAYNOTE[$COUNT7] = [$ARRAYNOTE[${COUNT7+1}]] @ ARRAYTOTF[$COUNT7] = [$ARRAYTOTF[${COUNT7+1}]] @ ARRAYSPEED[$COUNT7] = [$ARRAYSPEED[${COUNT7+1}]] @ XDCCount[$COUNT7] = [$XDCCount[${COUNT7+1}]] __calcsize $COUNT7 @ COUNT7 = COUNT7 + 1 } @ TOTPACK = TOTPACK - 1 pecho Pack #$TMPNUM removed from offer list. chgst } {/pecho Try a number between 1 and $TOTPACK\. }}}{}} {/pecho There are no files offered. }} alias AUTOGETmcommand { if (match($0 ON OFF)) {/upp AUTOGET $0} pecho Autogetting of offered files is $AUTOGET\. } alias AUTOCHATmcommand { if (match($0 ON ASK CLOSE)) {/upp AUTOCHAT $0} pecho Autoreceiving of chat requests is $AUTOCHAT\. (ON/ASK/CLOSE) } alias AUTODCCVOICEmcommand { if (match($0 ON OFF)) {/upp AUTODCCVOICE $0} pecho Autovoicing of DCC nicks $AUTODCCVOICE\. } alias SECmcommand { if (match($0 ON OFF)) {/upp SECURITY $0} pecho XDCC Security is $SECURITY\. } alias AUTOSENDmcommand { if (match($0 ON OFF)) {/upp AUTOSEND $0} pecho Autosending from offer list is $AUTOSEND\. } alias nosign { if (match($0 ON OFF)) {/upp NOSIGNVAR $0} pecho Suppression of signon, signoff, join, and leave messages is $NOSIGNVAR\. } alias cstat { if (match($0 ON OFF)) {/upp cstat $0} pecho Changing the status line is $cstat\. } alias AUTOCLOSEmcommand { if (match($0 ON OFF)) {/upp AUTOCLOSE $0} pecho Autoclose offered files \(refuse send\) is $AUTOCLOSE\. } alias AUTORENAMEmcommand { if (match($0 ON OFF)) {/upp AUTORENAME $0} pecho AutoRenaming of existing offered files is $AUTORENAME\. } alias OVERWRITEmcommand { if (match($0 ON OFF)) {/upp OVERWRITE $0} pecho Overwrite existing files \(no prompting\) is $OVERWRITE\. } alias ULDIRmcommand { if ([$0]) {^assign newdir $0} {^assign newdir $"[E/X] New upload directory: " } if ([$newdir]!=[]) { ^assign olddir $W ^cd $newdir ^assign uploaddir $W ^cd $olddir ^assign -olddir } ^assign -newdir pecho Upload directory: $uploaddir\. } alias DLDIRmcommand { if ([$0]) {^assign newdir $0} {^assign newdir $"[E/X] New download directory: " } if ([$newdir]!=[]) { ^assign olddir $W ^cd $newdir ^assign downloaddir $W ^cd $olddir ^assign -olddir } ^assign -newdir pecho Download directory: $downloaddir\. } alias x_file { ^assign TMP $0 if (rindex(/ $TMP)) { @ function_return = right(${@TMP-rindex(/ $0)+1} $0) } { @ function_return = [$0] } } alias adddccrequest { @ GETCOUNT = GETCOUNT + 1 @ ARRAYFILEGET[$GETCOUNT] = [$0] @ ARRAYNICKGET[$GETCOUNT] = [$1] chgst } alias CLOSEmcommand { if (GETCOUNT > 0) { @ TMPNICK = [] ^assign TMPNICK $"[E/X] Nick to remove get files (* for all): " if ([$TMPNICK]) { if ([$TMPNICK] == [*]) { @ GETCOUNT = 0 foreach ARRAYFILEGET XX { //^dcc close get $ARRAYNICKGET[$XX] } chgst pecho All files removed from get list. }{ @ COUNT8 = 1 @ COUNT9 = 1 @ COUNT10 = GETCOUNT while (COUNT9 <= COUNT10) { if ([$ARRAYNICKGET[$COUNT9]] != [$TMPNICK]) { @ ARRAYFILEGET[$COUNT8] = [$ARRAYFILEGET[$COUNT9]] @ ARRAYNICKGET[$COUNT8] = [$ARRAYNICKGET[$COUNT9]] @ COUNT8 = COUNT8 + 1 } { //^dcc c